summaryrefslogtreecommitdiff
path: root/test/files/neg/t5663-badwarneq.check
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-05-02 13:21:06 +0200
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-05-02 16:18:35 +0200
commit49f50727944a478bc5d10ad0658437286f47e422 (patch)
treec4e7a931f24cccf3c371fca440ad94dd19efd371 /test/files/neg/t5663-badwarneq.check
parent5819b78c25c9cba25fc84018d3905fe265bb4e18 (diff)
parent98972c95ab1e7c0ea2af9c9a958c0de60eb26b3d (diff)
downloadscala-49f50727944a478bc5d10ad0658437286f47e422.tar.gz
scala-49f50727944a478bc5d10ad0658437286f47e422.tar.bz2
scala-49f50727944a478bc5d10ad0658437286f47e422.zip
Merge 2.10.x into master
Conflicts: bincompat-forward.whitelist.conf src/compiler/scala/tools/nsc/matching/Patterns.scala src/compiler/scala/tools/nsc/transform/patmat/Logic.scala src/compiler/scala/tools/nsc/typechecker/Infer.scala src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala test/files/neg/t5663-badwarneq.check
Diffstat (limited to 'test/files/neg/t5663-badwarneq.check')
-rw-r--r--test/files/neg/t5663-badwarneq.check34
1 files changed, 26 insertions, 8 deletions
diff --git a/test/files/neg/t5663-badwarneq.check b/test/files/neg/t5663-badwarneq.check
index 12e93ff373..732e4f44d0 100644
--- a/test/files/neg/t5663-badwarneq.check
+++ b/test/files/neg/t5663-badwarneq.check
@@ -1,24 +1,42 @@
-t5663-badwarneq.scala:42: warning: comparing case class values of types Some[Int] and None.type using `==' will always yield false
+t5663-badwarneq.scala:47: warning: comparing case class values of types Some[Int] and None.type using `==' will always yield false
println(new Some(1) == None) // Should complain on type, was: spuriously complains on fresh object
^
-t5663-badwarneq.scala:43: warning: comparing case class values of types Some[Int] and Thing using `==' will always yield false
+t5663-badwarneq.scala:48: warning: comparing case class values of types Some[Int] and Thing using `==' will always yield false
println(Some(1) == new Thing(1)) // Should complain on type, was: spuriously complains on fresh object
^
-t5663-badwarneq.scala:51: warning: ThingOne and Thingy are unrelated: they will most likely never compare equal
+t5663-badwarneq.scala:56: warning: ThingOne and Thingy are unrelated: they will most likely never compare equal
println(t1 == t2) // true, but apparently unrelated, a compromise warning
^
-t5663-badwarneq.scala:52: warning: ThingThree and Thingy are unrelated: they will most likely never compare equal
+t5663-badwarneq.scala:57: warning: ThingThree and Thingy are unrelated: they will most likely never compare equal
println(t4 == t2) // true, complains because ThingThree is final and Thingy not a subclass, stronger claim than unrelated
^
-t5663-badwarneq.scala:55: warning: comparing case class values of types ThingTwo and Some[Int] using `==' will always yield false
+t5663-badwarneq.scala:60: warning: comparing case class values of types ThingTwo and Some[Int] using `==' will always yield false
println(t3 == Some(1)) // false, warn on different cases
^
-t5663-badwarneq.scala:56: warning: comparing values of types ThingOne and Cousin using `==' will always yield false
+t5663-badwarneq.scala:61: warning: comparing values of types ThingOne and Cousin using `==' will always yield false
println(t1 == c) // should warn
^
-t5663-badwarneq.scala:64: warning: comparing case class values of types Simple and SimpleSibling.type using `==' will always yield false
+t5663-badwarneq.scala:69: warning: comparing case class values of types Simple and SimpleSibling.type using `==' will always yield false
println(new Simple() == SimpleSibling) // like Some(1) == None, but needn't be final case
^
+t5663-badwarneq.scala:72: warning: ValueClass1 and Int are unrelated: they will never compare equal
+ println(new ValueClass1(5) == 5) // bad
+ ^
+t5663-badwarneq.scala:74: warning: comparing values of types Int and ValueClass1 using `==' will always yield false
+ println(5 == new ValueClass1(5)) // bad
+ ^
+t5663-badwarneq.scala:78: warning: ValueClass2[String] and String are unrelated: they will never compare equal
+ println(new ValueClass2("abc") == "abc") // bad
+ ^
+t5663-badwarneq.scala:79: warning: ValueClass2[Int] and ValueClass1 are unrelated: they will never compare equal
+ println(new ValueClass2(5) == new ValueClass1(5)) // bad - different value classes
+ ^
+t5663-badwarneq.scala:81: warning: comparing values of types ValueClass3 and ValueClass2[Int] using `==' will always yield false
+ println(ValueClass3(5) == new ValueClass2(5)) // bad
+ ^
+t5663-badwarneq.scala:82: warning: comparing values of types ValueClass3 and Int using `==' will always yield false
+ println(ValueClass3(5) == 5) // bad
+ ^
error: No warnings can be incurred under -Xfatal-warnings.
-7 warnings found
+13 warnings found
one error found