You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<masak> oh, but hm.
<masak> r: class C { has &!x; method f { say defined &!x; &!x //= {
'ook!' }; say defined &!x; &!x() } }; C.new.f
<p6eval> rakudo 5b56cf: OUTPUT«FalseTrueNull PMC access in
get_pmc_keyed_str() [...]
* masak submits rakudobug
<masak> r: sub foo(&x?) { &x //= { say "OH HAI" }; &x() }; foo
<p6eval> rakudo 5b56cf: OUTPUT«invoke() not implemented in class
'Callable' [...]
<jnthn> ah, no private attr needed.
<masak> yeah, but only the private attr gives a Null PMC access so far.
<jnthn> r: sub foo(&x?) { say defined &x; say
nqp::p6box_i(nqp::defined(&x)) }; foo
<p6eval> rakudo 5b56cf: OUTPUT«False1»
<jnthn> Well. That goes some way to explaining things.
<masak> r: class C { has &!x; method f { &!x() } }; C.new.f
<p6eval> rakudo 5b56cf: OUTPUT«No such method 'Any' for invocant of
type 'Parcel' [...]
<jnthn> Ohhhh...
<jnthn> It sees an invocation of a type object and thinks "oh, it's a coercin"
<jnthn> Since Any(...) is how you coerce.
Migrated from rt.perl.org#114230 (status was 'resolved')
Searchable as RT114230$
The text was updated successfully, but these errors were encountered: