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.
false
1 parent fc3e02b commit 189fbc1Copy full SHA for 189fbc1
tests/pos/i4226b.scala
@@ -0,0 +1,15 @@
1
+sealed abstract class Maybe[A]
2
+final case class Just[A](a: A) extends Maybe[A]
3
+class Empty[A] extends Maybe[A]
4
+object Empty {
5
+ def apply[A](): Maybe[A] = new Empty[A]
6
+ def unapply[A](e: Empty[A]): false = false
7
+}
8
+
9
+object Test {
10
+ val a: Maybe[Int] = Just(2)
11
+ def main(args: Array[String]): Unit = a match {
12
+ case Just(2) => true
13
+ case Empty() =>
14
+ }
15
0 commit comments