blob: 27d1baeebb18d97be24bb025305a8a266206958d (
plain) (
tree)
|
|
checksensible.scala:4: warning: comparing values of types scala.Ordered[scala.Unit] and scala.Unit using `>' will always yield false
println((c = 1) > 0)
^
checksensible.scala:5: warning: comparing values of types scala.Ordered[scala.Unit] and scala.Unit using `<=' will always yield true
println((c = 1) <= 0)
^
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)
^
checksensible.scala:11: warning: comparing a fresh object using `==' will always yield false
println(((x: int) => x + 1) == null)
^
checksensible.scala:12: warning: comparing a fresh object using `==' will always yield false
println(new Object == new Object)
^
checksensible.scala:13: warning: comparing a fresh object using `!=' will always yield true
println(new Array(1) != new Array(1))
^
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) {
^
10 warnings found
|