Skip to content

Commit 8719a88

Browse files
committed
Fix #1828: add test
1 parent 545930d commit 8719a88

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class Test {
2+
def remove[S](a: S | Int, f: Int => S):S = a match {
3+
case a: S => a // error
4+
case a: Int => f(a)
5+
}
6+
7+
val t: Int | String = 5
8+
val t1 = remove[String](t, _.toString)
9+
}

0 commit comments

Comments
 (0)