-
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
Simplify some places in the compiler where we have esoteric declarations. #2162
Conversation
case SyntaxKind.CatchClause: | ||
return (<CatchClause>node.parent).name === node; | ||
//case SyntaxKind.CatchClause: | ||
// return (<CatchClause>node.parent).name === node; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
var colonStart = skipTrivia(sourceFile.text, catchClause.name.end); | ||
grammarErrorAtPos(sourceFile, colonStart, ":".length, Diagnostics.Catch_clause_parameter_cannot_have_a_type_annotation); | ||
if (catchClause.variableDeclaration) { | ||
if (catchClause.variableDeclaration.name.kind !== SyntaxKind.Identifier) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
👍 |
>:=> (line 30, col 8) to (line 30, col 23) | ||
29 > } catch (e) { | ||
|
||
~ => Pos: (424 to 424) SpanInfo: undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i do not think this is correct. you can not put a breakpoint on "e".
Simplify some places in the compiler where we have esoteric declarations.
No description provided.