Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created July 6, 2016 19:34
+++ b/src/Perl6/Actions.nqp
@@ -2267,6 +2267,11 @@ class Perl6::Actions is HLL::Actions does STDActions {
method variable($/) {
my $past;
if $<index> {
+ if $<sigil> eq '&' {
+ $*W.throw: $/,
+ 'X::Syntax::Variable::InvalidCaptureSigil',
+ index => +$<index>;
+ }
$past := QAST::Op.new(
:op('call'),
:name('&postcircumfix:<[ ]>'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment