Skip to content

Commit bdca541

Browse files
authored
Merge pull request #12282 from dotty-staging/fix-12279
Fix #12279: Add test
2 parents 91727fd + 0ba1238 commit bdca541

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)