Skip to content

Commit

Permalink
Preserve compiler version in EVALs
Browse files Browse the repository at this point in the history
Previously it was always reset to the default one.

Fixes #3263
  • Loading branch information
vrurg committed Oct 23, 2019
1 parent c745d6b commit 0eea939
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Compiler.nqp
Expand Up @@ -31,7 +31,7 @@ class Perl6::Compiler is HLL::Compiler {
$!language_version
}
else {
$!language_version := self.config<language-version>
$!language_version := %*COMPILING<%?OPTIONS><language_version> || self.config<language-version>
}
}
method language_modifier() {
Expand Down
1 change: 1 addition & 0 deletions src/core.c/ForeignCode.pm6
Expand Up @@ -64,6 +64,7 @@ proto sub EVAL(
:outer_ctx($eval_ctx),
:global(GLOBAL),
:mast_frames(mast_frames),
:language_version(nqp::getcomp('perl6').language_version),
|(:optimize($_) with nqp::getcomp('perl6').cli-options<optimize>),
|(%(:grammar($LANG<MAIN>), :actions($LANG<MAIN-actions>)) if $LANG);

Expand Down

0 comments on commit 0eea939

Please sign in to comment.