develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35397 - trunk/languages/perl6/src/parser

From:
pmichaud
Date:
January 11, 2009 00:13
Subject:
[svn:parrot] r35397 - trunk/languages/perl6/src/parser
Message ID:
20090111081320.11FD6CB9F9@x12.develooper.com
Author: pmichaud
Date: Sun Jan 11 00:13:19 2009
New Revision: 35397

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

Log:
[rakudo]:  Fix default values for optional params (RT #61172).


Modified: trunk/languages/perl6/src/parser/actions.pm
==============================================================================
--- trunk/languages/perl6/src/parser/actions.pm	(original)
+++ trunk/languages/perl6/src/parser/actions.pm	Sun Jan 11 00:13:19 2009
@@ -1098,11 +1098,11 @@
     elsif $<named> eq ':' {          # named
         $var.named(~$<param_var><identifier>);
         if $quant ne '!' {      #  required (optional is default)
-            $var.viviself('Nil');
+            $var.viviself(container_itype($sigil));
         }
     }
     elsif $quant eq '?' {           # positional optional
-        $var.viviself('Nil');
+        $var.viviself(container_itype($sigil));
     }
 
     ##  handle any default value



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About