Skip to content

Commit 0f79124

Browse files
Close #5735: Add regression test
1 parent 0558618 commit 0f79124

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/pos/i5735.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
object Test {
2+
// The identity on types of the form N | P[a, P[b, ... P[z, N]]]
3+
type Nested[X, P[_, _], N] = X match {
4+
case N => N
5+
case P[a, b] => P[a, Nested[b, P, N]]
6+
}
7+
8+
class Foo[T] { def apply[Y >: T <: Nested[T, Tuple2, Unit]](t: T): T = t }
9+
def foo[T] = new Foo[T]
10+
11+
foo.apply((21, ()))
12+
}

0 commit comments

Comments
 (0)