Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #92986, MAIN should do a normal multi dispatch, not just call the …
…first matching candidate
  • Loading branch information
moritz committed Apr 5, 2012
1 parent c6607d0 commit 52d4515
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S06-other/main-usage.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 18;
plan 19;

BEGIN { @*INC.push: 't/spec/packages' }

Expand Down Expand Up @@ -150,3 +150,12 @@ is_run 'subset Command of Str where "run";
multi MAIN(Command $c) { print 1 },
multi MAIN() { print 2 }',
{ out => "2" };


# RT #92986
is_run 'multi MAIN($) { print q[Any] }; multi MAIN(Str) { print q[Str] }',
:args['foo'],
{
out => 'Str',
},
'best multi matches (not just first one)';

0 comments on commit 52d4515

Please sign in to comment.