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


<jnthn> rakudo: class Foo { has @.body; has &.writer = method ($x) {
@!body.push($x) }; }; my $x = Foo.new; $x.writer("oh");
$x.writer("hai"); .say for $x.body;
<p6eval> rakudo 5b679a: OUTPUT«Could not locate a method 'writer' to
invoke on lass 'Foo'.
* masak submits rakudobug
<masak> rakudo: class A { has &!m = method {}; method f { &!m() } }; A.new.f
<p6eval> rakudo 5b679a: OUTPUT«No such attribute '!m' [...]
<masak> rakudo: class A { has $!m = method { say "OH HAI {self}" };
method f { self.$!m() } }; A.new.f
<p6eval> rakudo 5b679a: OUTPUT«OH HAI A<0xb6a19880>␤»
<masak> that works. :)
<masak> those & sigils on attributes don't work so well.

Reply via email to