Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Desugaring bug with labeled continue #5

Open
ide-an opened this issue Aug 22, 2013 · 0 comments
Open

Desugaring bug with labeled continue #5

ide-an opened this issue Aug 22, 2013 · 0 comments
Assignees

Comments

@ide-an
Copy link

ide-an commented Aug 22, 2013

When we execute this code,

lbl:
for(var i=0;i<3;i++){
  for(var j=0;j<3;j++){
    if(i+j===3){
        continue lbl;// control should jump to (1)
    }
    print(i+":"+j);
  }
  // (1)
}
// (2) 

expected output is bellow.

0:0
0:1
0:2
1:0
1:1
2:0

But output of run.sh is

0:0
0:1
0:2
1:0
1:1

When labeled continue is executed, control should jump to (1).
In desugared code, however, it jumps to (2).
In other words, labeled continue behaves like labeled break.

@ghost ghost assigned arjunguha Aug 23, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants