Closed
Description
After the traits definitions:
trait N
trait Z extends N
trait S[P <: N] extends N
The newt match type have an issue:
type T[X <: N] <: N =
X match {
case Z => Z
case S[p] => T[p]
}
the error is:
5 | case S[p] => T[p]
| ^^^^
| found: |T[p]
| required: |N
|
| where: p is a type | in type T with bounds <: |N
|
| |Constraint(
| | uninstVars = ;
| | constrained types =
| | bounds =
| | ordering =
| |)
| Subtype trace:
| ==> |T[p] <:< |N
| <== |T[p] <:< |N = false