Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test invoke/postcircmfix:<( )> interaction.
  • Loading branch information
jnthn committed Dec 16, 2014
1 parent ac5776a commit d692769
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S12-methods/fallback.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 11;
plan 13;

# L<S12/"FALLBACK methods"/"special name FALLBACK">

Expand Down Expand Up @@ -55,4 +55,12 @@ is F.new.something(''), 'Str', 'Can multi-dispatch on regular arguments (also on

dies_ok { F.something() }, 'Error when none of the candidates match';

class I {
method postcircumfix:<( )>(|) { 'invaught' }
method FALLBACK($name, |c) { 'yes, I work' }
}
my $i = I.new;
is $i.spy, 'yes, I work', 'FALLBACK is effective with a postcircumfix:<( )>';
is $i(), 'invaught', 'postcircumfix:<( )> beats FALLBACK';

# vim: ft=perl6

0 comments on commit d692769

Please sign in to comment.