-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: handle type parameters (part 1) (#856)
Closes partially #23 ### Summary of Changes * New kind of type `TypeParameterType` to represent usages of type parameter references as types. * Store substitutions for type parameters in `ClassType` and take them into account for serialization and equality checks. * Compute element types for list literals. * Compute key/value types for map literals. * Compute type of indexed accesses on lists/maps. * Type checking for the indexed passed to an indexed access on maps (it already worked for lists). * Consider type parameter values when checking the assignability of class types. ### Deferred to future PRs There are additional features needed to fully handle type parameters, including * Inference of type parameter values for calls. * Substitution of type parameters for types of class members (e.g. for member access on an attribute). * Finding the lowest common superclass of class types with type parameters. These features will be added later in separate PRs.
- Loading branch information
1 parent
4ebae94
commit 8a35558
Showing
83 changed files
with
2,091 additions
and
975 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.