# New Ticket Created by  Moritz Lenz 
# Please include the string:  [perl #62262]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=62262 >


I've added some tests to t/spec/S12-construction/new.t which boil down to:

#+snip
class Parent {
    has $.x;
}

class Child is Parent {
    has $.y;
}

my $o;
...

lives_ok { $o = Child.new( :y(4), Parent{ :x<5> }) },
         'can instanticate class with explicit specification of parent
attrib';

#?rakudo todo 'OO initialization bug'
is $o.y, 4, '... worked for the child';
is $o.x, 5, '... worked for the parent';
#-snip

Here the initialization of Parent{ :x<5> } worked, but that of the Child
failed ($o.y is undef).

Cheers,
Moritz

Reply via email to