Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sink ops related to flow control

this busts compilation of Test.pm, because nqp::can(module {}, "anything") dies; but that needs fixing anyway
  • Loading branch information...
commit 86687dd5417ebe3f440fd1462c1c525ae2b3dd49 1 parent 9a6e1c5
@moritz moritz authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/Perl6/Actions.pm
View
12 src/Perl6/Actions.pm
@@ -66,8 +66,18 @@ class Perl6::Actions is HLL::Actions does STDActions {
),
);
}
+ my %sinkable := nqp::hash(
+ 'call', 1,
+ 'callmethod', 1,
+ 'while', 1,
+ 'until', 1,
+ 'repeat_until', 1,
+ 'repeat_while', 1,
+ 'if', 1,
+ 'unless', 1,
+ );
sub autosink($past) {
- nqp::istype($past, QAST::Op) && ($past.op eq 'call' || $past.op eq 'callmethod')
+ nqp::istype($past, QAST::Op) && %sinkable{$past.op}
?? sink($past)
!! $past;
}
Please sign in to comment.
Something went wrong with that request. Please try again.