Skip to content

Commit a4ef69b

Browse files
committed
test indirect method names
1 parent 4379a07 commit a4ef69b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

S02-names/indirect.t

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 4;
4+
plan 6;
55

66
{
77
my constant name = 'TestName';
@@ -20,3 +20,16 @@ plan 4;
2020
is a(4), 42, 'indirect sub name works';
2121
is &a.name, 'a', 'and the sub knows its name';
2222
}
23+
24+
{
25+
class A {
26+
method ::('indirect') {
27+
42
28+
}
29+
method ::('with space') {
30+
23
31+
}
32+
}
33+
is A.indirect, 42, 'can declare method with indirect name';
34+
is A."with space"(), 23, 'can declare indirect method name with space';
35+
}

0 commit comments

Comments
 (0)