Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Nov 15, 2024
1 parent 6cdfeb0 commit abd2514
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vlib/v/checker/assign.v
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,7 @@ fn (mut c Checker) assign_stmt(mut node ast.AssignStmt) {
if left.obj.ct_type_var in [.generic_var, .no_comptime]
&& c.table.cur_fn != unsafe { nil }
&& c.table.cur_fn.generic_names.len != 0
&& !right.comptime_ret_val
&& c.is_generic_expr(right) //&& right.return_type_generic.has_flag(.generic) {
&& !right.comptime_ret_val && c.is_generic_expr(right) {
// mark variable as generic var because its type changes according to fn return generic resolution type
left.obj.ct_type_var = .generic_var
if right.return_type_generic.has_flag(.generic) {
Expand Down

0 comments on commit abd2514

Please sign in to comment.