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


<masak> rakudo: role R { method foo { self.bar(42) }; method bar($x) {
say "OH HAI" } }; class C does R { method foo { self.R::foo } };
C.new.foo
<p6eval> rakudo 922500: OUTPUT«OH HAI␤»
<masak> rakudo: role R { method bar($x) {}; method foo { self.bar(42)
} }; class C does R { method foo { self.R::foo } }; C.new.foo
<p6eval> rakudo 922500: OUTPUT«Not enough positional parameters
passed; got 1 but expected 2␤ in 'bar' at line 22:/tmp/N060_2D3In␤  in
'C::foo' at line 22:/tmp/N060_2D3In␤  in main program body at line
22:/tmp/N060_2D3In␤»
* masak submits rakudobug
<masak> only the order of the method declarations in the role differs.
<masak> rakudo: role R { method bar($x) { say "OH HAI" }; method foo {
self.bar(42) } }; R.new.foo
<p6eval> rakudo 922500: OUTPUT«OH HAI␤»
<masak> and it seems that, somehow, the role method delegation is
necessary to trigger it.

Reply via email to