This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
Properly handle computed/static property names #1848
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1831
PR checklist
adjacent-overload-signatures
false positive with symbol names #1831What changes did you make?
Previously we used the name of an overload as the key. This caused problems for static and non-static properties conflicting, so #1772 was necessary. But that solution would give ugly error messages for conflicting static overloads. The new solution passes the pretty name separately from the key, so it avoids that problem.
(#1831 occured because the solution in #1772 had a problem when
nameText
was undefined: it would computeundefined + ""
, which isnt' itself undefined. This could be fixed by simply checking forundefined
before addingsuffix
, but I think this more complex PR is a better solution in the long run.)