summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-09-17 11:44:20 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-09-17 11:44:20 +1000
commit5c6e7b3d6587107bf6f9746c9be8643b53321614 (patch)
tree319c7d297d26d577190c0a977bf03e0a5f3f2870 /test/files/neg
parentbe825be0b0c5dcbd210c52295022ccee0a859262 (diff)
parent223e207e5a4904bf9a6bd70972fa69452d228529 (diff)
downloadscala-5c6e7b3d6587107bf6f9746c9be8643b53321614.tar.gz
scala-5c6e7b3d6587107bf6f9746c9be8643b53321614.tar.bz2
scala-5c6e7b3d6587107bf6f9746c9be8643b53321614.zip
Merge remote-tracking branch 'origin/2.11.x' into merge/2.11.x-to-2.12.x-20140917
Conflicts: build.xml The merge conflict was centred around the introduction of the build property `test.bc.skip`, and was straight forward to resolve.
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/warn-inferred-any.check5
-rw-r--r--test/files/neg/warn-inferred-any.scala8
2 files changed, 12 insertions, 1 deletions
diff --git a/test/files/neg/warn-inferred-any.check b/test/files/neg/warn-inferred-any.check
index 4628033e55..8ad81d1529 100644
--- a/test/files/neg/warn-inferred-any.check
+++ b/test/files/neg/warn-inferred-any.check
@@ -7,6 +7,9 @@ warn-inferred-any.scala:16: warning: a type was inferred to be `AnyVal`; this ma
warn-inferred-any.scala:17: warning: a type was inferred to be `AnyVal`; this may indicate a programming error.
{ 1l to 5l contains 5d }
^
+warn-inferred-any.scala:25: warning: a type was inferred to be `Any`; this may indicate a programming error.
+ def za = f(1, "one")
+ ^
error: No warnings can be incurred under -Xfatal-warnings.
-three warnings found
+four warnings found
one error found
diff --git a/test/files/neg/warn-inferred-any.scala b/test/files/neg/warn-inferred-any.scala
index b853e6e5a8..693c33e7be 100644
--- a/test/files/neg/warn-inferred-any.scala
+++ b/test/files/neg/warn-inferred-any.scala
@@ -17,3 +17,11 @@ trait Ys[+A] {
{ 1l to 5l contains 5d }
{ 1l to 5l contains 5l }
}
+
+trait Zs {
+ def f[A](a: A*) = 42
+ def g[A >: Any](a: A*) = 42 // don't warn
+
+ def za = f(1, "one")
+ def zu = g(1, "one")
+}