blob: 987efdd956914453bdc6e02bc2168779b7dbcd6b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
object Bar {
def unapply[A,B](bar:Bar[A,B]) = Some(bar)
}
class Bar[A,B](val _1:A, val _2:B) extends Product2[A,B] {
def canEqual(other: Any) = other.isInstanceOf[Bar[_,_]]
}
object Test {
new Bar(2, 'a') match {
case Bar(x,y) =>
}
}
|