# New Ticket Created by Moritz Lenz # Please include the string: [perl #75174] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75174 >
sub f { gather for 1..10 { return if $_ == 3; take +$_; } } my @x = f(); Output: No exception handler and no message current instr.: '&return' pc 18095 (src/builtins/Junction.pir:404) called from Sub '_block46' pc 373 (EVAL_1:45279834) called from Sub '_block39' pc 277 (EVAL_1:45279680) called from Sub 'perl6;GatherIterator;' pc 572757 (src/gen/core.pir:100526) called from Sub 'perl6;GatherIterator;get' pc 572737 (src/gen/core.pir:0) called from Sub 'perl6;Iterator;eager' pc 11606 (src/builtins/Role.pir:87) called from Sub 'perl6;Seq;!STORE' pc 14949 (src/builtins/Code.pir:188) called from Sub '_block14' pc 29 (EVAL_1:0) called from Sub '!YOU_ARE_HERE' pc 378767 (src/gen/core.pir:29448) called from Sub '!UNIT_START' pc 1400 (src/glue/run.pir:21) called from Sub 'perl6;PCT;HLLCompiler;eval' pc -1 ((unknown file):-1) called from Sub 'perl6;PCT;HLLCompiler;evalfiles' pc 1318 (compilers/pct/src/PCT/HLLCompiler.pir:714) called from Sub 'perl6;PCT;HLLCompiler;command_line' pc 1504 (compilers/pct/src/PCT/HLLCompiler.pir:801) called from Sub 'perl6;Perl6;Compiler;main' pc -1 ((unknown file):-1) I'd expect that to leave @x empty, not die.