aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test/script
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/test/script')
-rw-r--r--libbuild2/test/script/parser.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/libbuild2/test/script/parser.cxx b/libbuild2/test/script/parser.cxx
index b29ced9..944e1c8 100644
--- a/libbuild2/test/script/parser.cxx
+++ b/libbuild2/test/script/parser.cxx
@@ -1318,6 +1318,13 @@ namespace build2
include_set_ = nullptr;
scope_ = ≻
+ // The script shouldn't be able to modify the scope.
+ //
+ // Note that we need it for calling functions which require the
+ // current scope, such as $target.path().
+ //
+ build2::parser::scope_ = const_cast<build2::scope*> (&s.target_scope);
+
//@@ PAT TODO: set pbase_?
exec_scope_body ();