| | 117 | |
| | 118 | # test that you can inherit from a class with :: in the name. |
| | 119 | # A rakudo regression, http://rt.perl.org/rt3/Ticket/Display.html?id=60356 |
| | 120 | #?rakudo skip 'inheritance from classes with :: in the name' |
| | 121 | { |
| | 122 | class A::B { |
| | 123 | method ab { 'a'; }; |
| | 124 | }; |
| | 125 | |
| | 126 | class A::B::C is A::B { |
| | 127 | method abc { 'b'; }; |
| | 128 | } |
| | 129 | my $o = A::B::C.new; |
| | 130 | |
| | 131 | ok defined($o), 'can instantiate object from class A::B::C'; |
| | 132 | is $o.ab, 'a', 'can access inherited method'; |
| | 133 | is $o.abc, 'b', 'can access directly defined method'; |
| | 134 | } |