We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28a9fc9 commit 7c4672cCopy full SHA for 7c4672c
S02-types/capture.t
@@ -2,7 +2,7 @@ use v6;
2
3
use Test;
4
5
-plan 21;
+plan 24;
6
7
{
8
my $capture = \(1,2,3);
@@ -130,4 +130,19 @@ plan 21;
130
# RT #89766
131
nok (defined \()[0]), '\()[0] is not defined';
132
133
+# RT #116002
134
+{
135
+ class RT116002 {
136
+ method foo (Int) {}
137
+ }
138
+ my @a = 42;
139
+
140
+ ok \(RT116002, 42) ~~ RT116002.^find_method("foo").signature,
141
+ 'capture with scalar matches signature';
142
+ nok \(RT116002, @a) ~~ RT116002.^find_method("foo").signature,
143
+ 'capture with one element array does not match signature';
144
+ ok \(RT116002, |@a) ~~ RT116002.^find_method("foo").signature,
145
+ 'capture with infix:<|> on one element array matches signature';
146
+}
147
148
# vim: ft=perl6
0 commit comments