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> m: class C { has $.x = 42; submethod BUILD(:$.x) {} }; say C.new.x
<camelia> rakudo-moar fadca9: OUTPUT«Cannot find method 'STORE' in
submethod BUILD [...]
<masak> m: class C { has $.x = 42; submethod BUILD(:$!x = 5) { $.x }
}; say C.new.x
<camelia> rakudo-moar fadca9: OUTPUT«===SORRY!=== Error [...] Virtual
call $.x may not be used on partially constructed objects [...]
<masak> that "Virtual call" error message should probably happen for
:$.x as well...
* masak submits rakudobug
Even if using :$.x in a parameter list in a submethod is OK, the error
message "Cannot find method 'STORE'" is rather less-than-awesome and
mysterious as it stands.
<masak> m: class C { has $.x = 42; submethod BUILD(:$.x) {} }; say C.new.x
<camelia> rakudo-moar fadca9: OUTPUT«Cannot find method 'STORE' in
submethod BUILD [...]
<masak> m: class C { has $.x = 42; submethod BUILD(:$!x = 5) { $.x }
}; say C.new.x
<camelia> rakudo-moar fadca9: OUTPUT«===SORRY!=== Error [...] Virtual
call $.x may not be used on partially constructed objects [...]
<masak> that "Virtual call" error message should probably happen for
:$.x as well...
* masak submits rakudobug
Even if using :$.x in a parameter list in a submethod is OK, the error
message "Cannot find method 'STORE'" is rather less-than-awesome and
mysterious as it stands.
Well, nothing too mysterious in so far as we're not initialized enough yet to have storage set up. But yeah, it should never make it that far. Now:
===SORRY!=== Error while compiling -e
Virtual call $.x may not be used on partially constructed objects
at -e:1
------> s C { has $.x = 42; submethod BUILD(:$.x<HERE>) {} }
Migrated from rt.perl.org#125591 (status was 'resolved')
Searchable as RT125591$
The text was updated successfully, but these errors were encountered: