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

[svn:parrot] r35226 - branches/rvar2/languages/perl6/src/builtins

From:
jonathan
Date:
January 8, 2009 14:20
Subject:
[svn:parrot] r35226 - branches/rvar2/languages/perl6/src/builtins
Message ID:
20090108222025.7A20ACB9F9@x12.develooper.com
Author: jonathan
Date: Thu Jan  8 14:20:24 2009
New Revision: 35226

Modified:
   branches/rvar2/languages/perl6/src/builtins/guts.pir

Log:
[rakudo] Add back 'is default' trait. Passes S12-multi/default-trait.t.

Modified: branches/rvar2/languages/perl6/src/builtins/guts.pir
==============================================================================
--- branches/rvar2/languages/perl6/src/builtins/guts.pir	(original)
+++ branches/rvar2/languages/perl6/src/builtins/guts.pir	Thu Jan  8 14:20:24 2009
@@ -626,6 +626,23 @@
 .end
 
 
+=item !sub_trait_default(trait, block, arg)
+
+Sets the default trait, which marks a multi candidate as the default choice
+in an ambiguous multiple dispatch.
+
+=cut
+
+.sub '!sub_trait_default'
+    .param string trait
+    .param pmc block
+    .param pmc arg
+    $P0 = new 'Integer'
+    $P0 = 1
+    setprop block, 'default', $P0
+.end
+
+
 =item !sub_trait_export(trait, block, arg)
 
 =cut



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