Refactor type hierarchy logic
Open
P1
team-Starlark-Interpreter
type: bug
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
Most of the type hierarchy logic is in `eval/TypeChecker.java`, which powers the dynamic type checker. We should generalize and move this logic into `StarlarkType` or related helpers, which can be accessed by the static type checker.
We need to take care to implement correct gradual typing behavior w.r.t. `Any` in the type hierarchy, i.e. a "consistent subtype of" relation.
Contributor guide
Assessment
This issue has not been assessed yet.