Skip to content
Browse files

dispatch test involving literals and optional parameters (RT #88562)

  • Loading branch information...
1 parent 6fba902 commit 39684f0f4abc9cd15305fd1e2a593291367b52e2 @moritz moritz committed Sep 30, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 S06-multi/value-based.t
View
8 S06-multi/value-based.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 8;
+plan 9;
# L<S06/Routine modifiers/>
# L<S06/Parameters and arguments/>
@@ -40,4 +40,10 @@ plan 8;
is m3(2, 'A'), 'b', 'literal Int, anonymous parameters and default values mix';
}
+{
+ multi sub foo(0, $) { 'B' };
+ multi sub foo(Int $n, Str $a="A") { $a };
+ is foo(2,"A"), 'A', 'Literals and optionals mix';
+}
+
# vim: ft=perl6

0 comments on commit 39684f0

Please sign in to comment.
Something went wrong with that request. Please try again.