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
Chakra should throw an exception when evaluate an invalid "for" statement #5128
Comments
Sounds like overzealous ASI. |
Reproduced on Edge.
|
Was thinking of trying to fix this but first I took a quick look at it with eshost:
Then with eval CC still throws no error but the others do throw errors:
It seems that with no eval present all 4 engines happily apply ASI whereas without an eval only CC applies ASI - IMO CC's behaviour seems more logical than the other 3 engines here. I don't know the correct answer per spec though; but for now I won't try to submit a "fix" as not confident that current behaviour is wrong. |
I don’t think ASI should apply here at all: if you put the offending code into a function block then all engines will produce a syntax error. |
Hi everyone,
I found an inconsistency when try to evaluate a "for" statement without the body statement.
OS: Ubuntu 16.04 x64
Chakra: 1.10.0.0-beta
Step to reproduce:
Actual results:
Expected results:
I ran the second statement without
eval
function and Chakra passes without throw an Exception also.V8, SpiderMonkey and JavascriptCore works as expected.
cinfuzz
The text was updated successfully, but these errors were encountered: