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
In this example, elem is inferred to be of type Any instead of type X as in Scala 2:
objectTest {
deffoo[A<:X, B<:X, X](left: A, right: B):Unit= {
valelem=if (false) left else right
}
}
The issue is in TypeOps#approximateUnion, we approximate a union of types using the intersection of the base classes of the types, but that's not correct when the types are bounded by abstract types.