Author: jonathan
Date: Mon Jan 19 08:38:52 2009
New Revision: 35762
Modified:
trunk/languages/perl6/src/parser/actions.pm
Log:
[rakudo] When we had a multi foo() rather than a multi sub foo() we didn't call !SIGNATURE_BIND nor did we set the block type to Sub. Fix that.
Modified: trunk/languages/perl6/src/parser/actions.pm
==============================================================================
--- trunk/languages/perl6/src/parser/actions.pm (original)
+++ trunk/languages/perl6/src/parser/actions.pm Mon Jan 19 08:38:52 2009
@@ -571,6 +571,15 @@
PAST::Op.new(:inline(' setprop block, "proto", %0'), 1)
);
}
+
+ # If it's just a routine, need to mark it as a sub and make sure we
+ # bind its signature.
+ if $<routine_def> {
+ set_block_type($past, 'Sub');
+ $past[0].push(
+ PAST::Op.new( :pasttype('call'), :name('!SIGNATURE_BIND') )
+ );
+ }
}
make $past;
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.