summaryrefslogtreecommitdiff
path: root/test/files/run/t6196.scala
diff options
context:
space:
mode:
authorTobias Schlatter <tobias@meisch.ch>2014-03-13 14:47:31 +0100
committerTobias Schlatter <tobias@meisch.ch>2014-03-13 14:47:31 +0100
commit4b0b673c7d1e7ee9c979680ed217df6ca15452dc (patch)
tree1f68cbdeeeafa1fda482ff953f83a5222d056cc5 /test/files/run/t6196.scala
parent9c38e86a5526887f93a3f031b19a0e4fa31745d3 (diff)
downloadscala-4b0b673c7d1e7ee9c979680ed217df6ca15452dc.tar.gz
scala-4b0b673c7d1e7ee9c979680ed217df6ca15452dc.tar.bz2
scala-4b0b673c7d1e7ee9c979680ed217df6ca15452dc.zip
Minor fixes in test. The equals method always returned true.
This commit ensures that the classes we use to test HashMaps and HashSets in t6196 and t6200 have proper equals and hashCode methods. (The old equals method returned always true and therefore hashCode violated its contract).
Diffstat (limited to 'test/files/run/t6196.scala')
-rw-r--r--test/files/run/t6196.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/files/run/t6196.scala b/test/files/run/t6196.scala
index 16c2c7409d..a75911fb9e 100644
--- a/test/files/run/t6196.scala
+++ b/test/files/run/t6196.scala
@@ -43,7 +43,7 @@ object Test extends App {
override def equals(that:Any) = {
equalsCount += 1
- this match {
+ that match {
case HashCounter(value) => this.value == value
case _ => false
}