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

Fail is translated incorrectly in for-loop #400

Closed
PaulKlint opened this issue Nov 19, 2013 · 0 comments
Closed

Fail is translated incorrectly in for-loop #400

PaulKlint opened this issue Nov 19, 2013 · 0 comments
Assignees

Comments

@PaulKlint
Copy link
Member

It seems that we are not handling the fail label in for-loops correctly. This correct example

module experiments::Compiler::Examples::Tst

value main(list[value] args){int n = 0; loop:for(int i <- [1,2,3,4], n <= 3){ if (n == 3) fail loop; n = n + 1; } return n == 3;}

leads during loading to:

|rascal://experiments::Compiler::RVM::Run|(217,715,<12,0>,<23,28>): Java("RuntimeException","PANIC: undefined label FAIL_loop")
    at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.CodeBlock.getLabelPC(|file:///CodeBlock.java|(0,0,<134,0>,<134,0>))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants