diff options
author | Paul Phillips <paulp@improving.org> | 2009-09-11 17:08:43 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-09-11 17:08:43 +0000 |
commit | f9394a4d472887c4563e768467170a9b1677d5c1 (patch) | |
tree | 801fa248907e6c4b611eb35760b4ad641dfb05a6 /test/files/pos/unapplyGeneric.scala | |
parent | 514ff83e3983d81f8bf948abebbe5b9141d9690d (diff) | |
download | scala-f9394a4d472887c4563e768467170a9b1677d5c1.tar.gz scala-f9394a4d472887c4563e768467170a9b1677d5c1.tar.bz2 scala-f9394a4d472887c4563e768467170a9b1677d5c1.zip |
Made canEqual abstract in Product and only inse...
Made canEqual abstract in Product and only inserted into case classes if
no concrete implementation is inherited. Restored the disabled canEquals
usages in collections.
Diffstat (limited to 'test/files/pos/unapplyGeneric.scala')
-rw-r--r-- | test/files/pos/unapplyGeneric.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/files/pos/unapplyGeneric.scala b/test/files/pos/unapplyGeneric.scala index bf88816885..987efdd956 100644 --- a/test/files/pos/unapplyGeneric.scala +++ b/test/files/pos/unapplyGeneric.scala @@ -2,7 +2,9 @@ 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] +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 { |