Skip to content

Commit

Permalink
dispatch test involving literals and optional parameters (RT #88562)
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Sep 30, 2011
1 parent 6fba902 commit 39684f0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S06-multi/value-based.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 8;
plan 9;

# L<S06/Routine modifiers/>
# L<S06/Parameters and arguments/>
Expand Down Expand Up @@ -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.