-
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 invariant/covariant type parameters when computing lowes…
…t common supertype (#868) Closes partially #860 ### Summary of Changes Invariant/covariant type parameters are now handled when computing the lowest common supertype of a list of types. This functionality is used to compute the type of * lists (based on their elements) * maps (based on their keys and values) * elvis operator (based on their operands). It's also needed later for #861. Contravariant type parameters need a means to compute the highest common subtype, which will be tackled in a future PR.
- Loading branch information
1 parent
cf6e77e
commit 4d6cb4e
Showing
8 changed files
with
400 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ class C | |
class D sub C | ||
class E | ||
|
||
segment mySegment( | ||
segment mySegment1( | ||
c: C, | ||
cOrNull: C?, | ||
d: D, | ||
|
Oops, something went wrong.