Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Prevent parameters in post constraint subs from clobbering PRECEDING_…
…DECL

...which prevents trailing comments from getting attached to the routine

Fixes RT #125253
  • Loading branch information
hoelzro committed Jun 23, 2015
1 parent bcf38c9 commit 7fbd54a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Perl6/Actions.nqp
Expand Up @@ -7518,6 +7518,8 @@ Compilation unit '$file' contained the following violations:
$i++;
}
my %sig_info := hash(parameters => @params);
my $*PRECEDING_DECL; # prevent parameter(s) created in create_signature_and_params
# from clobbering routine declaration for trailing comments
my $signature := $*W.create_signature_and_params($/, %sig_info, $block, 'Mu');
add_signature_binding_code($block, $signature, @params);
my $code := $*W.create_code_object($block, 'WhateverCode', $signature);
Expand Down

0 comments on commit 7fbd54a

Please sign in to comment.