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

parser: cleanup in check_undefined_variables() (#13496)

This commit is contained in:
yuyi 2022-02-17 16:16:52 +08:00 committed by GitHub
parent 901a4d8b84
commit 4f9039991f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,8 +86,7 @@ fn (mut p Parser) check_undefined_variables(exprs []ast.Expr, val ast.Expr) ? {
} }
} }
ast.StructInit { ast.StructInit {
fields := val.fields.clone() for field in val.fields {
for field in fields {
p.check_undefined_variables(exprs, field.expr) ? p.check_undefined_variables(exprs, field.expr) ?
} }
} }