Skip to content

Commit 8c884c7

Browse files
committed
Fudge for niecza.
1 parent ae09ae0 commit 8c884c7

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

S14-roles/instantiation.t

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ role WithAttr {
3939
is $obj.y, 123, "role attributes initialized in constructor";
4040
}
4141

42-
role ParaRole[$x] {
43-
method get_x { $x }
44-
}
45-
42+
#?niecza skip 'No value for parameter $x in role-ParaRole'
4643
{
44+
role ParaRole[$x] {
45+
method get_x { $x }
46+
}
47+
4748
my $obj = ParaRole[42].new;
4849
my $obj2 = ParaRole[100].new;
4950

@@ -56,11 +57,14 @@ role ParaRole[$x] {
5657
is $obj2.get_x, 100, "instantiated object has method with correct associated role parameter";
5758
}
5859

59-
role ParaRole2Args[$x, $y] {
60-
method x { $x + $y }
61-
}
60+
#?niecza skip 'No value for parameter $x in role-ParaRole2Args'
61+
{
62+
role ParaRole2Args[$x, $y] {
63+
method x { $x + $y }
64+
}
6265

63-
is ParaRole2Args[4, 5].new.x, 9, 'instantiating a parametric role with two arguments works';
66+
is ParaRole2Args[4, 5].new.x, 9, 'instantiating a parametric role with two arguments works';
67+
}
6468

6569
# Can also pun a role and inherit from the punned class.
6670
{

0 commit comments

Comments
 (0)