Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Dec 29, 2024
1 parent bdc56c0 commit f151626
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vlib/v/checker/assign.v
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ fn (mut c Checker) assign_stmt(mut node ast.AssignStmt) {
left.obj.typ = c.comptime.comptime_for_field_type
} else if mut right is ast.CallExpr {
if right.name == 'map' && right.args.len > 0
&& right.args[0].expr is ast.AsCast {
&& right.args[0].expr is ast.AsCast
&& right.args[0].expr.typ.has_flag(.generic) {
left.obj.ct_type_var = .generic_var
} else if left.obj.ct_type_var in [.generic_var, .no_comptime]
&& c.table.cur_fn != unsafe { nil }
Expand Down

0 comments on commit f151626

Please sign in to comment.