diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-07 13:54:50 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-07 13:54:50 -0700 |
commit | 0f74eda2431ca2b9ae3b48ffdd6f7e5502a0843c (patch) | |
tree | b115f35ba10841494332d3d8f235dc915ea11e0f /test | |
parent | 48e80cb8c715cf8cb6dc73a5f894838671e385a4 (diff) | |
parent | 62cdd7ff9033eaa048fbdb72c58e7b9ac18461cd (diff) | |
download | scala-0f74eda2431ca2b9ae3b48ffdd6f7e5502a0843c.tar.gz scala-0f74eda2431ca2b9ae3b48ffdd6f7e5502a0843c.tar.bz2 scala-0f74eda2431ca2b9ae3b48ffdd6f7e5502a0843c.zip |
Merge pull request #2487 from paulp/issue/6091
SI-6091 overeager warning for reference equality
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t6091.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t6091.scala | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/t6091.flags b/test/files/pos/t6091.flags new file mode 100644 index 0000000000..954eaba352 --- /dev/null +++ b/test/files/pos/t6091.flags @@ -0,0 +1 @@ +-Xfatal-warnings -Xlint 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 + } +} |