Skip to content

Better fix for bogus duplicate identifier in module exports #24491

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 1 commit into from
May 30, 2018

Conversation

sandersn
Copy link
Member

The only situation the checker-based duplicate identifier check should fire is a conflict between a class type and a typedef type. The check works by starting from a class type and trying to resolve the class's name. Now, if a symbol with that name is found, the error is only logged if the resolved symbol is a typedef.
This avoids bogus self-duplicates in a more robust way than the previous fix, because === is not a good test for equality of symbols — symbols might be merged or part of a special JS assignment, or both.

Fixes #24024 and #24062

@sandersn sandersn requested review from mhegazy and a user May 30, 2018 16:30
@sandersn sandersn merged commit 22cdff5 into master May 30, 2018
@sandersn sandersn deleted the fix2-duplicate-identifier-in-module-exports branch May 30, 2018 16:59
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

👍

@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
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.

Duplicate identifier error in services for commonjs module.exports.prop =
2 participants