Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (12 sloc) 0.341 kb
plan(2);
class Parent {
has $!bar;
method bar() { $!bar }
}
class A is Parent {
has @!foo;
method foo() { @!foo }
}
my $x := A.bless(foo => [1, 2, 3], bar => 'BARBAR');
ok(nqp::join('|', $x.foo) eq '1|2|3', '.new() initializes child class attribute');
ok($x.bar eq 'BARBAR', '.new() initializes parent class attribute');
Jump to Line
Something went wrong with that request. Please try again.