From 63b5b6416c6bde16560eb9b83a9e3122599369d5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 14 Oct 2022 16:06:35 +0300 Subject: Fix 'for [] x: ...' to treat as value attributes --- libbuild2/build/script/parser.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libbuild2/build/script/parser.cxx') diff --git a/libbuild2/build/script/parser.cxx b/libbuild2/build/script/parser.cxx index 035ab6b..3098bc9 100644 --- a/libbuild2/build/script/parser.cxx +++ b/libbuild2/build/script/parser.cxx @@ -1455,15 +1455,14 @@ namespace build2 auto exec_for = [this] (const variable& var, value&& val, - const location& l) + const attributes& val_attrs, + const location&) { value& lhs (environment_->assign (var)); - // To match the function semantics also pass the value's type - // attribute, restoring it from RHS. Note that the value can't be - // NULL. - // - apply_value (&var, lhs, move (val), type::assign, l, val.type); + attributes_.push_back (move (val_attrs)); + + apply_value_attributes (&var, lhs, move (val), type::assign); }; build2::script::parser::exec_lines ( -- cgit v1.1