google / google/closure-compiler
Make TemplatizedType and TempateType no longer extend ProxyObjectType
Open
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
`TemplatizedType` and `TemplateType` should not extend `ProxyObjectType`. It causes all sorts of pain for equivalence and the hash code contract, and is unnecessary. `JSType` already has a `TemplateTypeMap` baked into it. We should simply model all `InstanceObjectType`s as templatized, possibly with zero keys. `TemplateType` should not be treated as unknown, but rather as a unique type (with possibly an upper bound - see bounded generics discussions), so proxy is inappropriate there, too.
This leaves proxy as only relevant for `NamedType`, so these could be collapsed into a single type.
Contributor guide
Assessment
This issue has not been assessed yet.