aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/unapplyGeneric.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/unapplyGeneric.scala')
-rw-r--r--tests/untried/pos/unapplyGeneric.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/untried/pos/unapplyGeneric.scala b/tests/untried/pos/unapplyGeneric.scala
new file mode 100644
index 000000000..987efdd95
--- /dev/null
+++ b/tests/untried/pos/unapplyGeneric.scala
@@ -0,0 +1,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) =>
+ }
+}