Skip to content

Commit 0aeb74e

Browse files
authored
Merge pull request #585 from Altai-man/test-param-subclass
Test Parameter subclassing
2 parents f39e92a + 8b29706 commit 0aeb74e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

S12-class/inheritance.t

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 40;
5+
plan 41;
66

77
# L<S12/Single inheritance/An "isa" is just a trait that happens to be another class>
88

@@ -177,4 +177,12 @@ throws-like 'class RT64642 is ::Nowhere {}', X::Inheritance::UnknownParent,
177177
throws-like 'class X is nosuchtrait { }', X::Inheritance::UnknownParent,
178178
'Get unkown parent error even when class is called X';
179179

180+
# https://github.com/rakudo/rakudo/issues/2829
181+
{
182+
class SubParameter is Parameter {
183+
has $.p2829;
184+
}
185+
is SubParameter.new(p2829 => 'p2829').p2829, 'p2829', 'Parameter subclass initializes attributes';
186+
}
187+
180188
# vim: ft=perl6

0 commit comments

Comments
 (0)