You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type variables and wildcards can act both as subtypes and
supertypes depending on the direction of the test. This means
types with variables and/or wildcards can shadow other types in
`glb/lub`.
Consider the following examples:
```scala
lub((Int, ? ) :: (Int, String) :: Nil)
glb((Int, ?A) :: (Int, String) :: Nil)
```
Intuitively both should return `(Int, String)`, but this depends
on the order of types in the list passed to `glb/lub`.
This commit incorporates the simple heuristic of moving types that
contain variables and/or wildcards to the end of the list.
Fixesscala/bug#10686 and fixesscala/bug#10740
0 commit comments