Author: jonathan
Date: Fri Jul 18 09:00:34 2008
New Revision: 29588

Modified:
   trunk/languages/perl6/src/parser/actions.pm

Log:
[rakudo] Make multi-methods vaguely work (in as far as subs work, anyway).

Modified: trunk/languages/perl6/src/parser/actions.pm
==============================================================================
--- trunk/languages/perl6/src/parser/actions.pm (original)
+++ trunk/languages/perl6/src/parser/actions.pm Fri Jul 18 09:00:34 2008
@@ -423,6 +423,11 @@
         $pirflags := $pirflags ~ ' :multi(';
         my $arity := [EMAIL PROTECTED];
         my $count := 0;
+        if $<routine_declarator><sym> eq 'method' {
+            # For methods, need to have a slot in the multi list for the
+            # invocant. XXX could be a type constraint in the sig on self.
+            $pirflags := $pirflags ~ '_, ';
+        }
         while $count != $arity {
             # How many types do we have?
             my $checks := @check_list[$count];

Reply via email to