Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Disallow $^A..Z as perl S06:1968

  • Loading branch information...
commit 8e617d5881cf1682a120735a601f3dfd6e9c09f1 1 parent a24bf6f
@lizmat lizmat authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/Perl6/Actions.nqp
View
5 src/Perl6/Actions.nqp
@@ -5489,6 +5489,11 @@ class Perl6::Actions is HLL::Actions does STDActions {
placeholder => $full_name,
);
}
+
+ # don't allow $^A..Z as placeholders, as per spec
+ elsif nqp::chars($full_name) == 3 && nqp::substr($full_name,2,1) ~~ /^<[A..Z]>$/ {
+ $*W.throw($/, ['X', 'Syntax', 'Perl5Var'], name => $full_name );
+ }
# Obtain/create placeholder parameter list.
my @params := $block<placeholder_sig> || ($block<placeholder_sig> := []);
Please sign in to comment.
Something went wrong with that request. Please try again.