diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-11-05 13:58:40 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-11-05 13:58:40 -0800 |
commit | 3b68b45a200087104a1ac2de7c4b86635023fd4d (patch) | |
tree | 3d9fad1100c241b8663703898e46c030698eafe7 /test/files/run/t6534.scala | |
parent | 999918311b7bf764916431485cb11043f1c220ed (diff) | |
parent | aedc853040d7774bd39df43a51715f674f99471e (diff) | |
download | scala-3b68b45a200087104a1ac2de7c4b86635023fd4d.tar.gz scala-3b68b45a200087104a1ac2de7c4b86635023fd4d.tar.bz2 scala-3b68b45a200087104a1ac2de7c4b86635023fd4d.zip |
Merge pull request #1574 from jsuereth/merge-2.10.0
Merge 2.10.0-RC2 into 2.10.x
Diffstat (limited to 'test/files/run/t6534.scala')
-rw-r--r-- | test/files/run/t6534.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t6534.scala b/test/files/run/t6534.scala new file mode 100644 index 0000000000..33df97e41e --- /dev/null +++ b/test/files/run/t6534.scala @@ -0,0 +1,14 @@ +trait Foo extends Any { override def equals(x: Any) = false } +trait Ding extends Any { override def hashCode = -1 } + +class Bippy1(val x: Int) extends AnyVal with Foo { } // warn +class Bippy2(val x: Int) extends AnyVal with Ding { } // warn + +object Test { + def main(args: Array[String]): Unit = { + val b1 = new Bippy1(71) + val b2 = new Bippy2(71) + assert(b1 == b1 && b1.## == b1.x.##, ((b1, b1.##))) + assert(b2 == b2 && b2.## == b2.x.##, ((b2, b2.##))) + } +} |