Skip to content

Commit 3185338

Browse files
authored
Merge pull request #6022 from dotty-staging/close-5735
Close #5735: Add regression test
2 parents fb68cf4 + 0f79124 commit 3185338

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/pos/i5735.scala

+12
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)