Skip to content

Ensure TypeChecker#getTypeAtLocation returns a defined result #25583

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

Merged
3 commits merged into from
Jul 11, 2018

Conversation

ghost
Copy link

@ghost ghost commented Jul 11, 2018

Fixes #25577

@ghost ghost requested review from DanielRosenwasser, weswigham and sandersn and removed request for weswigham July 11, 2018 17:15
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess no baselines changed because all the other callers were already correct?

In theory it would be nice to get a test case based on the bug this fixes, although with just a stack trace you'd have to make it from scratch.

@ghost
Copy link
Author

ghost commented Jul 11, 2018

This function was basically assumed to return a defined result everywhere. It's only had the | undefined type annotation since #22088.
I tried getting a repro but couldn't find a situation where it would return undefined and we have signature help -- may have to do with parse error handling causing an unusual node to be present there.

@ghost ghost merged commit 5f4a03c into master Jul 11, 2018
@ghost ghost deleted the getTypeAtLocation branch July 11, 2018 23:34
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants