Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (27 sloc) 729 Bytes
use v6;
use Test;
plan 3;
=begin description
=head1 Initialization of parent attributes
These are some tests for "Construction and Initialization" section of Synopsis
12, based on example code from Jonathan Worthington's Rakudo tests for
parent attribute initialization
=end description
# L<S12/Construction and Initialization/>
class Foo {
has $.x is rw;
method boo { $.x }
class Bar is Foo {
method set($v) { $.x = $v }
my Foo $u .= new(x => 5);
is($, 5, 'set attribute');
#?rakudo skip 'initialization of parent attributes RT #125129'
$u={ x => 12 });
is($, 12, 'set parent attribute');
is($, 9, 'reset parent attribute');
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.