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
#1754 is fixed but the error in #3990 seems incorrect:
caseclassOne[T](fst: T)
objectTest {
defbad[T](e: One[T]) = e match {
casefoo: One[a] =>valt:T= e.fst
valnok:Nothing= t // should not compilevalok: a = t // does compile
}
}
The nok line should not compile because T = a, as shown by the ok line, but the error claims that T >: a, which is true but incomplete and misleading:
7|valnok:Nothing= t // should not compile|^|found: T(t)
|required: Nothing||where: T is a typein method bad with bounds >: a
The text was updated successfully, but these errors were encountered:
This has the same root cause as what I described in #4069 (comment), we end up with constraints a >:> T and T >:> a but we don't unify them, so a value of type One[a] becomes a value of type One[_ >: T] outside of the scope where a is defined.
#1754 is fixed but the error in #3990 seems incorrect:
The
nok
line should not compile becauseT = a
, as shown by theok
line, but the error claims thatT >: a
, which is true but incomplete and misleading:The text was updated successfully, but these errors were encountered: