parser: cleanup in check_undefined_variables() (#13496)

pull/13507/head
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
1 changed files with 1 additions and 2 deletions

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) ?
} }
} }