develooper Front page | perl.perl6.compiler | Postings from June 2018

[perl #116595] [BUG] Nesting wrapping roles bind 'callsame' to thewrong recipient in Rakudo

Thread Previous | Thread Next
From:
Will Coleda via RT
Date:
June 21, 2018 19:39
Subject:
[perl #116595] [BUG] Nesting wrapping roles bind 'callsame' to thewrong recipient in Rakudo
Message ID:
rt-4.0.24-17332-1529609959-1434.116595-15-0@perl.org
On Wed, 30 Jan 2013 07:17:38 -0800, masak wrote:
> <masak> rn: role F[$n] { method x { callsame; callsame until $.v % $n } 
> }; class S { has $.v is rw = 1; method x { ++$.v } }; my $s = S.new; for 
> ^3 { $s.x; say $s.v; $s = $s but F[$s.v] }
> <p6eval> niecza v24-18-gaf64300: OUTPUT«2␤3␤5␤»
> <p6eval> ..rakudo b3fc32: OUTPUT«(timeout)2␤3␤»
> <masak> jnthn: this is as short as I'm able to golf it.
> <masak> jnthn: the problem happens in the 'callsame' in the 'until' loop, 
> and the .x method in the S object never gets triggered. or rather, it 
> gets triggered in Niecza, but it gets waylaid in Rakudo.

Unchanged behavior in 2018.05-55-g95aa77c94
-- 
Will "Coke" Coleda

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About