Closed
Description
Compiler version
since 3.4.2, still present in main
Minimized code
object Test {
type MTWithBind[X] = X match {
case List[t] => t
}
}
Output
With -Xprint:typer
:
type MTWithBind[X >: Nothing <: Any] =
X match
{
case List[t @ _] => t
}
<: t
Expectation
t
should not appear in the inferred bound of the match type, since it is outside of its declaring scope.
Overall I'm getting increasingly uneasy about #19761. 🫤