Author: jonathan
Date: Tue Nov 11 04:26:04 2008
New Revision: 32530
Modified:
trunk/languages/perl6/src/parser/actions.pm
Log:
[rakudo] Must create subset types earlier (in the end at compile time, but for
now moving them to $?INIT, the same time as we do classes, makes things work
much better).
Modified: trunk/languages/perl6/src/parser/actions.pm
==============================================================================
--- trunk/languages/perl6/src/parser/actions.pm (original)
+++ trunk/languages/perl6/src/parser/actions.pm Tue Nov 11 04:26:04 2008
@@ -2900,7 +2900,14 @@
$past
);
- make $past;
+ # Put this code in $?INIT, so the type is created early enough, then this
+ # node results in an empty statement node.
+ our $?INIT;
+ unless defined($?INIT) {
+ $?INIT := PAST::Block.new();
+ }
+ $?INIT.push($past);
+ make PAST::Stmts.new();
}