Skip to content

Fix type and local confusion when resolving types #2075

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
merged 3 commits into from
Sep 14, 2021
Merged

Fix type and local confusion when resolving types #2075

merged 3 commits into from
Sep 14, 2021

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Sep 14, 2021

Fixes #1684 by hinting whether a lookup is supposed to find a type. Relevant in resolveType within functions, where a type can be shadowed by a local.

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@dcodeIO dcodeIO requested a review from MaxGraey September 14, 2021 10:56
@@ -3049,23 +3051,23 @@ export class File extends Element {
}

/* @override */
lookupInSelf(name: string): DeclaredElement | null {
var element = super.lookupInSelf(name);
getMember(name: string): DeclaredElement | null {
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@MaxGraey
Copy link
Member

Could you fix lint?

@dcodeIO dcodeIO merged commit 62071b7 into main Sep 14, 2021
@dcodeIO dcodeIO deleted the issue-1684 branch September 14, 2021 12:21
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.

Name conflicting with generic params in some cases
2 participants