# New Ticket Created by Elizabeth Mattijsen # Please include the string: [perl #130030] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=130030 >
<lizmat> m: role A { has $!foo }; class B does A { method b() { $!foo := 42 } }; B.b # shouldn't this just work ? <camelia> rakudo-moar 8b40d1: OUTPUT«X::TypeCheck::Binding exception produced no message in method b at <tmp> line 1 in block <unit> at <tmp> line 1» <lizmat> jnthn ^^^ <timotimo> m: role A { has $!foo }; class B does A { method b() { $!foo := 42 } }; B.new.b <camelia> rakudo-moar 8b40d1: OUTPUT«X::TypeCheck::Binding exception produced no message in method b at <tmp> line 1 in block <unit> at <tmp> line 1» <timotimo> m: role A { has $!foo }; class B does A { method b() { $!foo = 42 } }; B.new.b <camelia> rakudo-moar 8b40d1: ( no output ) <lizmat> yeah, I missed the .new in my example, but the result is the same, no? <lizmat> binding just doesn't work <timotimo> right <timotimo> are assignments to native attributes already just nqp::bindattr? <timotimo> er, not "native" <timotimo> but that kind of makes it awkward to put Scalar objects into attributes and assigning binds the new value to replace the scalar instead of assigning into the scalar? <timotimo> except if you use accessors, you potentially get an AttrRef that's scalar-like? perhaps? <lizmat> what I want to achieve is to bind an nqp::list from a '$!reified' slot <lizmat> if I just assign, I get this: <lizmat> $ 6l 'my @a[10] = ^10; say @a.iterator.pull-one' <lizmat> Segmentation fault: 11 <lizmat> :-( <lizmat> ok, I guess I'll work around it :-( <lizmat> timotimo: do you agree this is buggable ? <timotimo> huh, ouch <nine> lizmat: all segfaults are buggable <timotimo> quite