Skip to content

Commit

Permalink
Disallow $^A..Z as perl S06:1968
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Aug 21, 2013
1 parent a24bf6f commit 8e617d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Perl6/Actions.nqp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5489,6 +5489,11 @@ class Perl6::Actions is HLL::Actions does STDActions {
placeholder => $full_name, 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. # Obtain/create placeholder parameter list.
my @params := $block<placeholder_sig> || ($block<placeholder_sig> := []); my @params := $block<placeholder_sig> || ($block<placeholder_sig> := []);
Expand Down

0 comments on commit 8e617d5

Please sign in to comment.