# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #125591]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=125591 >


<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.

Reply via email to