Skip to content

Commit

Permalink
Don't mark $_ container with is dynamic in 6.d
Browse files Browse the repository at this point in the history
We already changed the spectests to allow for this change to happen
during the 6.d release preparations.

The moving of `finishpad` is to make sure that we don't create the topic
container descriptor until after the language version is decided;
otherwise, even in 6.c it will be created as non-dynamic and then
re-used after that point in that mode.
  • Loading branch information
jnthn committed Jan 2, 2019
1 parent 401a354 commit 33f79fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Perl6/Grammar.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,9 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
$*W.loading_and_symbol_setup($/)
}
<.finishpad>
<.bom>?
<lang-version>
<.finishpad>
<statementlist=.FOREIGN_LANG($*MAIN, 'statementlist', 1)>
<.install_doc_phaser>
Expand Down
4 changes: 2 additions & 2 deletions src/Perl6/World.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -1913,8 +1913,8 @@ class Perl6::World is HLL::World {
'default_value', $WHAT,
'scalar_value', $WHAT,
);
my $desc :=
self.create_container_descriptor($Mu, $name, $WHAT, 1);
my $dynamic := $*W.lang-ver-before('d') || $name ne '$_';
my $desc := self.create_container_descriptor($Mu, $name, $WHAT, $dynamic);

my $cont := self.build_container_and_add_to_sc(%info, $desc);

Expand Down

0 comments on commit 33f79fe

Please sign in to comment.