Skip to content

Fix bug when name resolution fails in a @typedef: Don't set lastLocation#24585

Merged
2 commits merged intomasterfrom
jsdocResolveNameFailureInTypedef
Jun 1, 2018
Merged

Fix bug when name resolution fails in a @typedef: Don't set lastLocation#24585
2 commits merged intomasterfrom
jsdocResolveNameFailureInTypedef

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 1, 2018

Fixes #24577

@ghost ghost requested a review from sandersn June 1, 2018 19:51
Comment thread src/compiler/checker.ts
lastLocation = location;
location = getJSDocHost(location).parent;
continue;
location = getJSDocHost(location);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Note: we still go to .parent a few lines down in the usual way, so the only effect is on lastLocation.

@@ -0,0 +1,19 @@
error TS5055: Cannot write file '/a.js' because it would overwrite input file.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I usually add @noEmit: true to avoid this warning.

@ghost ghost merged commit 9be846e into master Jun 1, 2018
@ghost ghost deleted the jsdocResolveNameFailureInTypedef branch June 1, 2018 23:49
ghost pushed a commit that referenced this pull request Jun 1, 2018
…tion` (#24585)

* Fix bug when name resolution fails in a @typedef: Don't set `lastLocation`

* Add noEmit to test
mhegazy added a commit that referenced this pull request Jun 2, 2018
…FailureInTypedef

Fix bug when name resolution fails in a @typedef: Don't set `lastLocation` (#24585)
@microsoft microsoft locked and limited conversation to collaborators Aug 2, 2018
This pull request was closed.
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