We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2db43da + 04ec346 commit a880769Copy full SHA for a880769
tests/patmat/i12808.scala
@@ -0,0 +1,10 @@
1
+import scala.reflect.Typeable
2
+
3
+case class Err1()
4
+case class Err2()
5
6
+def handleError[A: Typeable, B: Typeable](x: Either[A | B, Nothing]): Unit =
7
+ x match // false alarm warning: It would fail on pattern case: Left(_)
8
+ case Left(e: A) => println("A")
9
+ case Left(_: B) => println("B")
10
+ case Right(_) => println("Nothing")
0 commit comments