Skip to content

Better fix for bogus duplicate identifier in module exports - #24491

Merged
Nathan Shively-Sanders (sandersn) merged 1 commit into
masterfrom
fix2-duplicate-identifier-in-module-exports
May 30, 2018
Merged

Nathan Shively-Sanders (sandersn) merged 1 commit into
masterfrom
fix2-duplicate-identifier-in-module-exports

Conversation

@sandersn

Copy link
Copy Markdown
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
Nathan Shively-Sanders (sandersn) deleted the fix2-duplicate-identifier-in-module-exports branch May 30, 2018 16:59

@ghost Deleted user (ghost) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

@microsoft 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