Skip to content

Commit 4f51472

Browse files
add test
1 parent 240f9e9 commit 4f51472

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

tests/run/t13418.check

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
no match
2-
no match
1+
ok
2+
ok
3+
ok

tests/run/t13418.scala

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ class X { class Y[Q] }
77
val x1 = new X
88
val x2 = new X
99
val y: Any = new x1.Y[Int]
10+
type Foo = [Q] =>> x2.Y[Q]
11+
type Bar = [Q] =>> x1.Y[Q]
1012

1113
@main def Test() = {
1214
b match {
13-
case _: a2.B => println("match")
14-
case _ => println("no match")
15+
case _: a2.B => println("wrong")
16+
case _: a1.B => println("ok")
1517
}
1618
y match {
17-
case _: x2.Y[_] => println("match")
18-
case _ => println("no match")
19+
case _: x2.Y[_] => println("wrong")
20+
case _: x1.Y[_] => println("ok")
21+
}
22+
y match {
23+
case _: Foo[_] => println("wrong")
24+
case _: Bar[_] => println("ok")
1925
}
2026
}

0 commit comments

Comments
 (0)