From 0ba12386a831c950fe7933e43adc2cfb8104d386 Mon Sep 17 00:00:00 2001 From: Liu Fengyun Date: Thu, 29 Apr 2021 17:32:07 +0200 Subject: [PATCH] Fix #12279: Add test --- tests/patmat/i12279.scala | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/patmat/i12279.scala 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(())