Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't include subsignature in lexical name
See previous commit for a little more detail.  `&block:(Dog)` was
getting inserted into the pad as `&block:(Dog)` rather than just
`&block`
  • Loading branch information
hoelzro committed Dec 7, 2014
1 parent 8c242c0 commit 1926e14
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Perl6/Actions.nqp
Expand Up @@ -3693,7 +3693,13 @@ class Perl6::Actions is HLL::Actions does STDActions {
if $twigil eq '' || $twigil eq '*' {
# Need to add the name.
if $<name> {
self.declare_param($/, ~$/);
my $name := ~$/;
if $<subsignature> {
my $subsig := ~$<subsignature>;
# 3 for :()
$name := nqp::substr($name, 0, nqp::chars($name) - nqp::chars($subsig) - 3);
}
self.declare_param($/, $name);
}
}
elsif $twigil eq '!' {
Expand Down

0 comments on commit 1926e14

Please sign in to comment.