diff options
Diffstat (limited to 'test/files/run/t0631.scala')
-rw-r--r-- | test/files/run/t0631.scala | 16 |
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) +} |