Skip to content
Permalink
Browse files

Unbreak serialization of langs

In NQP, a `sub` ends up in the serialization context, while a pointy
block does not. This gets P5builtins passing its tests again, but the
couple of warnings about lang/braid misuse remain, and need checking
more closely. Part of dealing with #2637.
  • Loading branch information...
jnthn committed Jan 25, 2019
1 parent f7ba400 commit 9517c3779776ef3b26bd17f214c80eb663982d2e
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Perl6/World.nqp
@@ -1219,11 +1219,11 @@ class Perl6::World is HLL::World {
for $arglist {
%dyn{$_} := 1;
}
$*LANG.set_pragma('dynamic-scope', -> $var { %dyn{$var} || 0 });
$*LANG.set_pragma('dynamic-scope', sub ($var) { %dyn{$var} || 0 });
}
else {
# All variables.
$*LANG.set_pragma('dynamic-scope', -> $var { 1 });
$*LANG.set_pragma('dynamic-scope', sub ($var) { 1 });
}
}
else {

0 comments on commit 9517c37

Please sign in to comment.
You can’t perform that action at this time.