We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2923d32 commit 46c680cCopy full SHA for 46c680c
tests/run/zero-arity-case-class.scala
@@ -0,0 +1,26 @@
1
+case class Foo()
2
+
3
+object Test {
4
+ def main(args: Array[String]): Unit = {
5
+ assert(Foo.unapply(Foo()) == true)
6
7
+ // unapply generate by scalac are `_ != null`,
8
+ // dotty returns true in all cases
9
+ assert(Foo.unapply(null) == true)
10
11
+ Foo() match {
12
+ case Foo() => ()
13
+ case _ => ???
14
+ }
15
16
17
+ case _: Foo => ()
18
19
20
21
+ (Foo(): Any) match {
22
23
24
25
26
+}
0 commit comments