Skip to content

Always emit diagnostic when a call expression can be fixed by adding a semicolon#27669

Merged
DanielRosenwasser merged 1 commit into
masterfrom
betterErrorForAccidentalCall
Nov 12, 2018
Merged

Always emit diagnostic when a call expression can be fixed by adding a semicolon#27669
DanielRosenwasser merged 1 commit into
masterfrom
betterErrorForAccidentalCall

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Oct 9, 2018

Sequel to #27020

That PR fixed the particular problem, but I don't think it's necessary to do this only for type assertions. Any time we have an expression, then a newline, then a parenthesized expression, and the first expression wasn't callable, it's likely that the fix is to add a semicolon.

@ghost ghost requested a review from DanielRosenwasser October 10, 2018 00:13
@DanielRosenwasser DanielRosenwasser merged commit 830be06 into master Nov 12, 2018
@DanielRosenwasser
Copy link
Copy Markdown
Member

Awesome, thanks Andy!

@DanielRosenwasser DanielRosenwasser deleted the betterErrorForAccidentalCall branch November 12, 2018 22:50
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant