Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add tests for RT #116002
  • Loading branch information
usev6 committed Mar 31, 2015
1 parent 28a9fc9 commit 7c4672c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion S02-types/capture.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 21;
plan 24;

{
my $capture = \(1,2,3);
Expand Down Expand Up @@ -130,4 +130,19 @@ plan 21;
# RT #89766
nok (defined \()[0]), '\()[0] is not defined';

# RT #116002
{
class RT116002 {
method foo (Int) {}
}
my @a = 42;

ok \(RT116002, 42) ~~ RT116002.^find_method("foo").signature,
'capture with scalar matches signature';
nok \(RT116002, @a) ~~ RT116002.^find_method("foo").signature,
'capture with one element array does not match signature';
ok \(RT116002, |@a) ~~ RT116002.^find_method("foo").signature,
'capture with infix:<|> on one element array matches signature';
}

# vim: ft=perl6

0 comments on commit 7c4672c

Please sign in to comment.