Skip to content

Commit

Permalink
Merge pull request scala#12282 from dotty-staging/fix-12279
Browse files Browse the repository at this point in the history
Fix scala#12279: Add test
  • Loading branch information
liufengyun authored Apr 30, 2021
2 parents 91727fd + 0ba1238 commit bdca541
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/patmat/i12279.scala
Original file line number Diff line number Diff line change
@@ -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(())

0 comments on commit bdca541

Please sign in to comment.