Skip to content

Commit 0ba1238

Browse files
committed
Fix #12279: Add test
1 parent 3633d62 commit 0ba1238

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/patmat/i12279.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import scala.reflect.Typeable
2+
3+
def unionTypeTest[T: Typeable](m: Int|T) =
4+
m match
5+
case x: Int => println("Got Int")
6+
case t: T => println("Got T")
7+
8+
@main def run =
9+
unionTypeTest(())

0 commit comments

Comments
 (0)