Skip Menu |
Report information
Id: 132076
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: vovan-ve [at]

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

To: rakudobug [...]
Date: Wed, 13 Sep 2017 22:31:05 +0800
Subject: next/last controls loop from exception stack instead of lexical loop
From: Vovan-VE <vovan-ve [...]>
I'm using rakudo release 2017.07. I'm sure I hit a bug. I could not find something similar in google, sorry if it is duplicate.
Here is code:
Show quoted text
use v6.c;
sub foo($v) {
    # Some loop which does a cool stuff
    for ^1 {
        # Fail in some edge case
        die "BOO!"      if 2 == $v;
        say "inner $v";
for 1..3 -> $i {
    say "start outer $i";
    try {
        CATCH {
            default {
                last; # it should be applied too lexical `for 1..3` but it controls outsourced loop from exception stack
    say "end outer $i";
say "end";
Code and actual/expected output are here: .
Best regards.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at