summaryrefslogtreecommitdiff
path: root/test/files/run/t0631.scala
diff options
context:
space:
mode:
authorpradel <pradel@epfl.ch>2008-04-07 07:04:55 +0000
committerpradel <pradel@epfl.ch>2008-04-07 07:04:55 +0000
commita197e61bc8068f97767a62f1bf5cf6b35ccfba86 (patch)
tree5eaeda1bd29859040f9fae9f7b25f546fd68102c /test/files/run/t0631.scala
parentb6f12c08007eb558bffe6fd89a8aad3b2fab27f3 (diff)
downloadscala-a197e61bc8068f97767a62f1bf5cf6b35ccfba86.tar.gz
scala-a197e61bc8068f97767a62f1bf5cf6b35ccfba86.tar.bz2
scala-a197e61bc8068f97767a62f1bf5cf6b35ccfba86.zip
test and fix for #631
Diffstat (limited to 'test/files/run/t0631.scala')
-rw-r--r--test/files/run/t0631.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t0631.scala b/test/files/run/t0631.scala
new file mode 100644
index 0000000000..e64301e514
--- /dev/null
+++ b/test/files/run/t0631.scala
@@ -0,0 +1,16 @@
+object Test extends Application {
+ class Foo {
+ override def equals(that: Any) = {
+ println("Foo.equals called")
+ super.equals(that)
+ }
+ }
+
+ println(new Foo == new Foo)
+
+ case class Bar(x: Foo)
+ val b = new Bar(new Foo)
+
+ // this should not call Foo.equals, but simply compare object identiy of b
+ println(b == b)
+}