Skip to content

Commit

Permalink
Added tests for R#2420
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 24, 2018
1 parent bd7bdb8 commit 86dc2d1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S06-other/introspection.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 12;
plan 18;

# L<S06/Other matters/Introspection>

Expand Down Expand Up @@ -40,3 +40,10 @@ is(&multi-sub.cando(\()).[0].(),"m3","you can invoke through introspection");
ok(\(1) ~~ $sig,"junction sig matches second candidate");
ok(\() ~~ $sig, "junction sig matches third candidate");
}

# R#2420
for (* == 42), -> $ { } -> &callable {
is &callable.cando( \() ).elems, 0, 'Whatevercode with \()';
is &callable.cando( \(666) ).elems, 1, 'Whatevercode with \(666)';
is &callable.cando( \(666,42) ).elems, 0, 'Whatevercode with \(666,42)';
}

0 comments on commit 86dc2d1

Please sign in to comment.