On Thu Apr 02 06:26:38 2009, masak wrote:
> <ruoso> rakudo: class A { has $.foo; submethod BUILD($obj) { $!foo = 7
> } }; say A.new.foo;
> <p6eval> rakudo c40f3b: OUTPUT«Null PMC access in getprop() [...]
> * masak submits rakudobug

Thanks to some fixes a little while back, this now works:

<@jnthn> rakudo: class A { has $.foo; submethod BUILD() { $!foo = 7; }
}; say A.new.foo;
< p6eval> rakudo 1831bd: OUTPUT«7␤»

Note that you don't need to take a $obj as self is the object being
constructed.

Thanks,

Jonathan

Reply via email to