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
My understand is as follows: the variance validator takes the position that you can use type parameters however you like if your owner is a term, like val foo0. Though you are prohibited from declaring foo0 to have the unsound type ("Parameter type in structural refinement may not refer to an abstract type defined outside that refinement"), scala is still willing to infer it. In this case, that it infers within A[T] that foo0 has type
ScalaObject{def contains(z0: T):Unit}
Since A is covariant in T, it's bedlam in soundness town.
The text was updated successfully, but these errors were encountered:
I thought I was going to fix this, but I started getting pretty far afield so I'll open it.
My understand is as follows: the variance validator takes the position that you can use type parameters however you like if your owner is a term, like val foo0. Though you are prohibited from declaring foo0 to have the unsound type ("Parameter type in structural refinement may not refer to an abstract type defined outside that refinement"), scala is still willing to infer it. In this case, that it infers within A[T] that foo0 has type
ScalaObject{def contains(z0: T):Unit}
Since A is covariant in T, it's bedlam in soundness town.
The text was updated successfully, but these errors were encountered: