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
[Error] /xxx/TypeBound_Minimal.scala:8:43: Type argument <: TypeBound_Minimal.this.Max does not overlap with lower bound Any
two errors found
Expectation
Don't see a reason why the bounding argument TMin has to be widen to Any.
In general I found type argument unification has been superb for exact types (e.g. type T = F[Max]), but bounded free types (e.g. type T = F[_ >: Min <: Max]) was always treated as some kind of second-class citizen, while in practice type T = F[Max] is merely an alias of type T = F[_ >: Max <: Max], can we have a compiler spec to elevate them to first-class citizens?
The text was updated successfully, but these errors were encountered:
Compiler version
3.5.2
Minimized code
Output
Expectation
Don't see a reason why the bounding argument
TMin
has to be widen toAny
.In general I found type argument unification has been superb for exact types (e.g.
type T = F[Max]
), but bounded free types (e.g.type T = F[_ >: Min <: Max]
) was always treated as some kind of second-class citizen, while in practicetype T = F[Max]
is merely an alias oftype T = F[_ >: Max <: Max]
, can we have a compiler spec to elevate them to first-class citizens?The text was updated successfully, but these errors were encountered: