Skip to content
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
merged 2 commits into from
Dec 23, 2016

Conversation

andy-hanson
Copy link
Contributor

Fixes #1831

PR checklist

What 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 compute undefined + "", which isnt' itself undefined. This could be fixed by simply checking for undefined before adding suffix, but I think this more complex PR is a better solution in the long run.)

Use { name, key } records where 'key' is ugly, but never conflicts for static/non-static ir computed/non-computed properties.
@nchen63
Copy link
Contributor

nchen63 commented Dec 14, 2016

code looks good. need to resolve merge conflict

@adidahiya adidahiya changed the title Properly handle computed/static property names. Properly handle computed/static property names Dec 15, 2016
@nchen63 nchen63 merged commit f44457d into palantir:master Dec 23, 2016
@nchen63
Copy link
Contributor

nchen63 commented Dec 23, 2016

@andy-hanson thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adjacent-overload-signatures false positive with symbol names
3 participants