From 4f9039991f9ea2aa21427274b35ac257393c46ab Mon Sep 17 00:00:00 2001 From: yuyi Date: Thu, 17 Feb 2022 16:16:52 +0800 Subject: [PATCH] parser: cleanup in check_undefined_variables() (#13496) --- vlib/v/parser/assign.v | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vlib/v/parser/assign.v b/vlib/v/parser/assign.v index a03320162e..9d10b4763c 100644 --- a/vlib/v/parser/assign.v +++ b/vlib/v/parser/assign.v @@ -86,8 +86,7 @@ fn (mut p Parser) check_undefined_variables(exprs []ast.Expr, val ast.Expr) ? { } } ast.StructInit { - fields := val.fields.clone() - for field in fields { + for field in val.fields { p.check_undefined_variables(exprs, field.expr) ? } }