1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: correct error message for seclector_expr_assign.vv (#14747)

This commit is contained in:
yuyi
2022-06-13 01:29:54 +08:00
committed by GitHub
parent 139c34c07d
commit 3535927bcd
2 changed files with 4 additions and 4 deletions

View File

@@ -244,8 +244,8 @@ fn (mut p Parser) partial_assign_stmt(left []ast.Expr, left_comments []ast.Comme
ast.PrefixExpr {}
ast.SelectorExpr {
if op == .decl_assign {
return p.error_with_pos('struct fields can only be declared during the initialization',
lx.pos)
return p.error_with_pos('use assignment `=` instead of declaration `:=` when modifying struct fields',
pos)
}
}
else {