-
Notifications
You must be signed in to change notification settings - Fork 854
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
When for
loop has a label at beginning, break
does not work correctly
#275
Comments
An even simpler version: for (var i=0; i<4; i++)
label: {
console.log(i);
break;
} |
This is certainly a bug. |
* Add method to GetClassID If you want to extend a built-in class you need it's class ID and there is no robust way to get that without this accessor. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> * introduce constant for invalid class ID Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> --------- Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
Just wanted to flag that this bug is affecting more use-cases now that the js_of_ocaml Ocaml->JS compiler has moved to heavy use of labels and break statements for control flow If it doesn't seem like too tricky a problem, I'd be happy to have a try - would just need to be pointed towards the right place to start. Thanks! |
@andrjohns: I shall take a look this week. |
Consider the following code
When I run this code in Safari, Firefox, Chrome, or V8's
d8
console, they print out:However, with
qjs
, it prints:For context, I'm encountering this problem with some code generated from compiling Dart Sass to JS: sass/dart-sass#2212
The text was updated successfully, but these errors were encountered: