blob: 8ed6a901cd645004568374bf424b6230827b8231 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class A extends Product1[Int] {
def _1 = 1
def isEmpty = false // used by scalac
def isDefined = !isEmpty // used by dotty
def canEqual(a: Any) = true
}
object d{
def unapply(a: Any) = new A
val p: Any = ???
val f = p match {case d(1) => true; case _ => false}
}
|