-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Invalid completion record on BreakStatement with label #162
Comments
Looks like it's due to the leap manager trying to resolve it to a loop when any expression can be in a label statement. |
What's the expected behavior? Can a labeled |
Looks like it just breaks the current block. So in the original example code For some context the example is taken from the traceur test suite. |
Interesting! |
@benjamn Great! Unrelated question but have the generator error messages been standardised? I'm running 6to5 against the Traceur tests (which is how I found this bug) and the error messages don't match up which isn't that big of a deal but just thought I'd ask. |
Most if not all errors in the generator spec just say "if X then throw a TypeError" with no specified message. I've tried to keep compatibility with V8 just so the tests work in Node v0.11, but maybe I'm over-testing those error messages… |
Another go(function*() {
// Enter mini event loop.
eventLoop:
while(true) {
let {channel, value} = yield alts([stickiness, killChan]);
switch(channel) {
// When the stickiness changes.
case stickiness:
$navItems
.find(".js-siteNavItemIcon")
.each((idx, el) => resetIcon($(el), state.isSticky));
break;
case killChan:
break eventLoop;
}
}
}); If I remove the If I replace the |
@lukasmlady would you mind minimizing that example as far as possible (if it isn't already minimal) and opening a new issue? I think this bug might have a distinct root cause. |
@benjamn yep, will do. |
invalid completion record: {"type":"break","target":null}
The text was updated successfully, but these errors were encountered: