Still reproducible (2017.11,HEAD(e5b660e)) On 2015-08-28 10:05:31, FROGGS.de wrote: > m: sub foo { say &?ROUTINE.perl; gather for 1 { say &?ROUTINE.perl; }; > gather for 1 { say &?ROUTINE.perl; } }; foo > rakudo-moar 5fb81f: OUTPUT«sub foo () { #`(Sub|59748232) ... > }Code.newCode.new» > rakudo-moar 186223: OUTPUT«sub foo () { #`(Sub|53058688) ... > }Code.newCode.new» > > m: sub foo { say &?ROUTINE.perl; for 1 { say &?ROUTINE.perl; }; gather > for 1 { say &?ROUTINE.perl; } }; foo > rakudo-moar 5fb81f: OUTPUT«sub foo () { #`(Sub|42434376) ... }sub foo > () { #`(Sub|42434376) ... }Code.new» > rakudo-moar 186223: OUTPUT«sub foo () { #`(Sub|54308288) ... }sub foo > () { #`(Sub|54308288) ... }Code.new» > > m: sub foo($,$,$) { say &?ROUTINE.arity; for 1 { say &?ROUTINE.arity; }; > gather for 1 { say &?ROUTINE.arity; } }; foo 1, 2, 3 > rakudo-moar 5fb81f: OUTPUT«330» > rakudo-moar 186223: OUTPUT«330» > > m: sub foo($,$,$) { say &?ROUTINE.arity; for 1 { say &?ROUTINE.arity; }; > gather for 1 { if 1 { say &?ROUTINE.arity } } }; foo 1, 2, 3 > rakudo-moar 5fb81f: OUTPUT«333» > rakudo-moar 186223: OUTPUT«333» > > I expect that the &?ROUTINE in the gather also points to the foo subroutine.
[perl #125934] [BUG] &?ROUTINE changes to something else in gather in for loop
Aleks-Daniel Jakimenko-Aleksejev via RT Sat, 02 Dec 2017 20:35:55 -0800