diff --git a/tests/patmat/i12279.scala b/tests/patmat/i12279.scala new file mode 100644 index 000000000000..5ba517757861 --- /dev/null +++ b/tests/patmat/i12279.scala @@ -0,0 +1,9 @@ +import scala.reflect.Typeable + +def unionTypeTest[T: Typeable](m: Int|T) = + m match + case x: Int => println("Got Int") + case t: T => println("Got T") + +@main def run = + unionTypeTest(())