Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
unbreak NativeCall for the JVM
The call to nqp::buildnativecall fails because it does not recognize the first arg as
an NativeCallInstance. Doing the clone always like before e167669
makes it work, see also: https://gist.github.com/FROGGS/0d4b5c771c7d9eb4f5b6
  • Loading branch information
FROGGS committed Nov 7, 2014
1 parent a3d18ca commit 393acf0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Perl6/Actions.nqp
Expand Up @@ -2448,7 +2448,12 @@ class Perl6::Actions is HLL::Actions does STDActions {
# Install PAST block so that it gets capture_lex'd correctly and also
# install it in the lexpad.
my $outer := $*W.cur_lexpad();
#?if jvm
my $clone := 1; # Workaround to unbreak NativeCall on JVM.
#?endif
#?if !jvm
my $clone := !($outer =:= $*UNIT);
#?endif
$outer[0].push(QAST::Stmt.new($block));

# Install &?ROUTINE.
Expand Down

0 comments on commit 393acf0

Please sign in to comment.