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
classCase2 {
traitContainer[+A] {
defaddAll[B>:A, T2<:Container[B]](that: T2):Boolean
}
deft1:Container[Int] =???deft2:Container[Any] =???// Works
t1.addAll[Any, Container[Any]](t2)
// Errors://* type mismatch; found : Case2.this.Container[Any] required: T2//* inferred type arguments [Int,Case2.this.Container[Any]] do not conform to method addAll's type parameter bounds [B >: Int,T2 <: Case2.this.Container[B]]
t1.addAll(t2)
}
Why can't least common supertype be inferred?
The text was updated successfully, but these errors were encountered:
Why can't least common supertype be inferred?
The text was updated successfully, but these errors were encountered: