Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created July 6, 2016 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/4fbe33369824f45d8e2c098542834047 to your computer and use it in GitHub Desktop.
Save zoffixznet/4fbe33369824f45d8e2c098542834047 to your computer and use it in GitHub Desktop.
+++ 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