Valid continue statements fail inside a switch statement while(1) { print("foo"); switch(1) { case 1: continue; } } The problem is that getJumpContext with an empty label will return the nearest JumpContext, but in the case of continue it needs to return the nearest JumpContext with a continue target.
Created attachment 20741 [details] Proposed patch Here is a fix.
Comment on attachment 20741 [details] Proposed patch I'd prefer: + if (forContinue) { + for (int i = m_jumpContextStack.size() - 1; i >= 0; i--) { + JumpContext* scope = &m_jumpContextStack[i]; + if (scope->continueTarget) + return scope; + } + return 0; + } But other than that, r=me
Created attachment 20742 [details] Revised proposed patch Modified as per Oliver's suggestion.