-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Grammar checking errors should be reported during binding phases instead of type-checking phase #6107
Comments
This is the tsserver. Moving to TS. |
@dbaeumer @StrongRef so here is what happen in these situation. Compilers can have error from different states : parsing, binding, type-checking (this include grammar errors), and emitting phases.The compiler will not report grammar error during typ-checking(e.g "Octal Literals are not available when targeting ECMAScript5 and higher") if there are a parsing errors (e.g from doing Arguably, it may be the case taht we should move the grammar checking phase from type-checking phase into binding phase. @CyrusNajmabadi can weight-in more. |
|
From @StrongRef on December 15, 2015 9:32
When declaring an octal literal, an error is shown.
![error1](https://cloud.githubusercontent.com/assets/16247609/11806897/601b9f94-a316-11e5-901c-d3a59257fb5f.png)
However, if another error is introduced, the error for octal literal usage is omitted.
![error2](https://cloud.githubusercontent.com/assets/16247609/11806917/7d572592-a316-11e5-8913-9faa08df0f89.png)
Another strict rule violation, this time both errors are visible.
![error3](https://cloud.githubusercontent.com/assets/16247609/11806958/c402e9b8-a316-11e5-9bbb-b6d2ca665e3d.png)
I could like into this one, just want to make sure this is an actual error.
Copied from original issue: microsoft/vscode#1318
The text was updated successfully, but these errors were encountered: