Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make a real pad etc. for a signature literal, to prevent various thin…

…gs exploding in nasty ways.
  • Loading branch information...
commit dca2ab53775a96219a03a1da52a5e753b0507eec 1 parent 16f22b8
@jnthn jnthn authored
Showing with 6 additions and 3 deletions.
  1. +6 −1 src/Perl6/Actions.pm
  2. +0 −2  src/Perl6/Grammar.pm
View
7 src/Perl6/Actions.pm
@@ -2746,10 +2746,15 @@ class Perl6::Actions is HLL::Actions {
}
method fakesignature($/) {
+ my $fake_pad := $*W.pop_lexpad();
my %sig_info := $<signature>.ast;
my @params := %sig_info<parameters>;
set_default_parameter_type(@params, 'Mu');
- my $sig := create_signature_object($/, %sig_info, $*FAKE_PAD, :no_attr_check(1));
+ my $sig := create_signature_object($/, %sig_info, $fake_pad, :no_attr_check(1));
+
+ $*W.cur_lexpad()[0].push($fake_pad);
+ $*W.create_code_object($fake_pad, 'Block', $sig);
+
make QAST::WVal.new( :value($sig) );
}
View
2  src/Perl6/Grammar.pm
@@ -1742,10 +1742,8 @@ grammar Perl6::Grammar is HLL::Grammar {
}
token fakesignature {
- :my $*FAKE_PAD;
<.newpad>
<signature>
- { $*FAKE_PAD := $*W.pop_lexpad() }
}
token signature {
Please sign in to comment.
Something went wrong with that request. Please try again.