-
Notifications
You must be signed in to change notification settings - Fork 200
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
No break or return statement found in case #353
Comments
I don't think it's contrived at all, I've ran into it myself. |
It doesn't detect a function foo (data) {
var i = 9;
switch (data) {
case 'foo':
i = 99;
break
case 'bar':
break;
};
while (i > 0) {
i--
};
}; |
empy case produces empty when. And when I convert from coffee to JS, even if I put empty ; inside of when, it gives back the funny code without break statement. when 'bar'
; ↓ case 'bar': |
I'm guessing this won't get fixed as this has been an issue for over a year, no response has been given, and the last release was in July of 2015. |
+1 AND @tgaeta what editor is that? |
I am getting the same problem https://github.com/opal/opal/blob/acba5f18fb45e1c226c015abbe2cb99a26121bf6/opal/corelib/kernel.rb#L342 this code is failing on the conversion |
It is the js2.coffee website This problem is frustrating, is there any way I could get around this? |
Both of these examples fail because it doesn't detect the return in the
if
statement, or thethrow
that would end the function.This pattern may seem kinda weird/contrived, but it's actually used in real code: https://github.com/pouchdb/GQL/blob/0b8d892d4922df56b301951402d614b9311250e5/pouchdb.gql.js#L635
The text was updated successfully, but these errors were encountered: