summaryrefslogtreecommitdiff
path: root/test/files/neg/checksensible.check
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-03-22 18:22:49 +0000
committerMartin Odersky <odersky@gmail.com>2007-03-22 18:22:49 +0000
commit800ce668acb253c3d5e57b5230d913ad155a0f74 (patch)
treea7526664522ee11348087e5bb80957182b9ba17e /test/files/neg/checksensible.check
parent0196b0e057dcd62903b6635f53d2857ea182280a (diff)
downloadscala-800ce668acb253c3d5e57b5230d913ad155a0f74.tar.gz
scala-800ce668acb253c3d5e57b5230d913ad155a0f74.tar.bz2
scala-800ce668acb253c3d5e57b5230d913ad155a0f74.zip
modified sinsibility checks and test cases
Diffstat (limited to 'test/files/neg/checksensible.check')
-rw-r--r--test/files/neg/checksensible.check10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/files/neg/checksensible.check b/test/files/neg/checksensible.check
index a4cf1cfe41..27d1baeebb 100644
--- a/test/files/neg/checksensible.check
+++ b/test/files/neg/checksensible.check
@@ -7,9 +7,11 @@ checksensible.scala:5: warning: comparing values of types scala.Ordered[scala.Un
checksensible.scala:6: warning: comparing values of types scala.Unit and scala.Int using `==' will always yield false
println((c = 1) == 0)
^
+actual = class Stringfalse
checksensible.scala:8: warning: comparing values of types scala.Int and java.lang.String using `==' will always yield false
println(1 == "abc")
^
+actual = class Booleanfalse
checksensible.scala:9: warning: comparing values of types scala.Int and scala.Boolean using `!=' will always yield true
println(1 != true)
^
@@ -22,7 +24,11 @@ checksensible.scala:12: warning: comparing a fresh object using `==' will always
checksensible.scala:13: warning: comparing a fresh object using `!=' will always yield true
println(new Array(1) != new Array(1))
^
-checksensible.scala:20: warning: comparing values of types scala.Unit and scala.Int using `!=' will always yield true
+actual = trait Nullfalse
+checksensible.scala:16: warning: comparing values of types scala.Int and scala.Null using `==' will always yield false
+ if( foo.length == null ) // == 0 makes more sense, but still
+ ^
+checksensible.scala:26: warning: comparing values of types scala.Unit and scala.Int using `!=' will always yield true
while((c = in.read) != -1) {
^
-9 warnings found
+10 warnings found