Skip to content

Commit

Permalink
parser: fix assigning with in another module sumtypes 2 (#19415)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 committed Sep 23, 2023
1 parent 3fab321 commit 5905f63
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions vlib/v/parser/assign.v
Expand Up @@ -286,6 +286,7 @@ fn (mut p Parser) partial_assign_stmt(left []ast.Expr, left_comments []ast.Comme
}
}
pos.update_last_line(p.prev_tok.line_nr)
p.expr_mod = ''
return ast.AssignStmt{
op: op
left: left
Expand Down
1 change: 0 additions & 1 deletion vlib/v/parser/containers.v
Expand Up @@ -164,7 +164,6 @@ fn (mut p Parser) array_init(is_option bool) ast.ArrayInit {
}
}
pos := first_pos.extend_with_last_line(last_pos, p.prev_tok.line_nr)
p.expr_mod = ''
return ast.ArrayInit{
is_fixed: is_fixed
has_val: has_val
Expand Down

0 comments on commit 5905f63

Please sign in to comment.