Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next/last controls loop from exception stack instead of lexical loop #6511

Open
p6rt opened this issue Sep 13, 2017 · 1 comment
Open

next/last controls loop from exception stack instead of lexical loop #6511

p6rt opened this issue Sep 13, 2017 · 1 comment

Comments

@p6rt
Copy link

p6rt commented Sep 13, 2017

Migrated from rt.perl.org#132076 (status was 'new')

Searchable as RT132076$

@p6rt
Copy link
Author

p6rt commented Sep 13, 2017

From vovan-ve@yandex.ru

Hello.   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​:     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 {         foo($i);         CATCH {             default {                 .say;                 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​: https://gist.github.com/anonymous/6912bd53ce24af0d76d62d522dfc0b94  .   Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant