diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/checksensible.check | 8 | ||||
-rw-r--r-- | test/files/pos/t5175.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t5175.scala | 9 |
3 files changed, 11 insertions, 7 deletions
diff --git a/test/files/neg/checksensible.check b/test/files/neg/checksensible.check index d45d16165f..0881205bb4 100644 --- a/test/files/neg/checksensible.check +++ b/test/files/neg/checksensible.check @@ -28,12 +28,6 @@ checksensible.scala:27: error: comparing values of types Int and Unit using `==' checksensible.scala:29: error: comparing values of types Int and String using `==' will always yield false 1 == "abc" ^ -checksensible.scala:32: error: String and Int are unrelated: they will most likely never compare equal - "abc" == 1 // warns because the lub of String and Int is Any - ^ -checksensible.scala:33: error: Some[Int] and Int are unrelated: they will most likely never compare equal - Some(1) == 1 // as above - ^ checksensible.scala:38: error: comparing a fresh object using `==' will always yield false new AnyRef == 1 ^ @@ -100,4 +94,4 @@ checksensible.scala:84: error: comparing values of types EqEqRefTest.this.C3 and checksensible.scala:95: error: comparing values of types Unit and Int using `!=' will always yield true while ((c = in.read) != -1) ^ -34 errors found +32 errors found diff --git a/test/files/pos/t5175.flags b/test/files/pos/t5175.flags new file mode 100644 index 0000000000..e8fb65d50c --- /dev/null +++ b/test/files/pos/t5175.flags @@ -0,0 +1 @@ +-Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t5175.scala b/test/files/pos/t5175.scala new file mode 100644 index 0000000000..e15cc3affd --- /dev/null +++ b/test/files/pos/t5175.scala @@ -0,0 +1,9 @@ +object Test { + def ==(p: Phase): Int = 0 + + def foo { + ==(new Phase()) + } +} + +class Phase |