summaryrefslogtreecommitdiff
path: root/test/files/pos/t6091.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-05-02 15:05:50 -0700
committerPaul Phillips <paulp@improving.org>2013-05-02 15:35:03 -0700
commit62cdd7ff9033eaa048fbdb72c58e7b9ac18461cd (patch)
tree269b167d0cf5e9f755a2f12cab5b452f0439ca76 /test/files/pos/t6091.scala
parent98972c95ab1e7c0ea2af9c9a958c0de60eb26b3d (diff)
downloadscala-62cdd7ff9033eaa048fbdb72c58e7b9ac18461cd.tar.gz
scala-62cdd7ff9033eaa048fbdb72c58e7b9ac18461cd.tar.bz2
scala-62cdd7ff9033eaa048fbdb72c58e7b9ac18461cd.zip
SI-6091 overeager warning for reference equality
Don't warn on eq and ne unless they're the real eq or ne.
Diffstat (limited to 'test/files/pos/t6091.scala')
-rw-r--r--test/files/pos/t6091.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/t6091.scala b/test/files/pos/t6091.scala
new file mode 100644
index 0000000000..72e663ec3b
--- /dev/null
+++ b/test/files/pos/t6091.scala
@@ -0,0 +1,10 @@
+object Foo { def eq(x:Int) = x }
+
+class X { def ==(other: String) = true }
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ Foo eq 1
+ new X == null
+ }
+}