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


This be Rakudo db84bc on Parrot r43174.

$ perl6 -e 'class A { method foo() { self = 5 } }; my A $a = A.new;
$a.foo; say $a; say $a.WHAT'
5
Int()

I'm not sure 'self' should be a writable lvalue in the first place.
But if it's supposed to be, I'd still think that the above ought to be
disallowed for some reason. Note that the above manages to sneak an
Int into variable typed to only contain A objects.

Reply via email to