diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-10-16 15:51:48 +0200 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-10-16 15:51:48 +0200 |
commit | cd0f48c9567e9e52378c9c4c9b28e892bb2461a9 (patch) | |
tree | c3cfa4b876c1ccd4a3766b3a32a2c54a727be7ab /test | |
parent | ae47ccc35bdcfbdb965e2297b131a2416495d4e7 (diff) | |
parent | e20f9e9f1fcf2a25603b2b75528e4d9395557411 (diff) | |
download | scala-cd0f48c9567e9e52378c9c4c9b28e892bb2461a9.tar.gz scala-cd0f48c9567e9e52378c9c4c9b28e892bb2461a9.tar.bz2 scala-cd0f48c9567e9e52378c9c4c9b28e892bb2461a9.zip |
Merge remote-tracking branch 'scala/2.10.x' into merge-2.10.x
Conflicts:
build.number
test/files/neg/classmanifests_new_deprecations.check
Diffstat (limited to 'test')
-rw-r--r-- | test/files/jvm/deprecation.check | 2 | ||||
-rw-r--r-- | test/files/neg/t7783.check | 18 | ||||
-rw-r--r-- | test/files/neg/t7783.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t7783.scala | 15 | ||||
-rw-r--r-- | test/files/run/t4542.check | 3 |
5 files changed, 35 insertions, 4 deletions
diff --git a/test/files/jvm/deprecation.check b/test/files/jvm/deprecation.check index e263e4909d..d116778d3f 100644 --- a/test/files/jvm/deprecation.check +++ b/test/files/jvm/deprecation.check @@ -1,3 +1,3 @@ -warning: there were 5 deprecation warning(s); re-run with -deprecation for details +warning: there were 4 deprecation warning(s); re-run with -deprecation for details Note: deprecation/Use_2.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. diff --git a/test/files/neg/t7783.check b/test/files/neg/t7783.check new file mode 100644 index 0000000000..647cfee121 --- /dev/null +++ b/test/files/neg/t7783.check @@ -0,0 +1,18 @@ +t7783.scala:1: warning: type D in object O is deprecated: +object O { class C; @deprecated("", "") type D = C; def foo: Seq[D] = Nil } + ^ +t7783.scala:11: warning: type D in object O is deprecated: + type T = O.D + ^ +t7783.scala:12: warning: type D in object O is deprecated: + locally(null: O.D) + ^ +t7783.scala:13: warning: type D in object O is deprecated: + val x: O.D = null + ^ +t7783.scala:14: warning: type D in object O is deprecated: + locally(null.asInstanceOf[O.D]) + ^ +error: No warnings can be incurred under -Xfatal-warnings. +5 warnings found +one error found diff --git a/test/files/neg/t7783.flags b/test/files/neg/t7783.flags new file mode 100644 index 0000000000..d1b831ea87 --- /dev/null +++ b/test/files/neg/t7783.flags @@ -0,0 +1 @@ +-deprecation -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/neg/t7783.scala b/test/files/neg/t7783.scala new file mode 100644 index 0000000000..995b644a09 --- /dev/null +++ b/test/files/neg/t7783.scala @@ -0,0 +1,15 @@ +object O { class C; @deprecated("", "") type D = C; def foo: Seq[D] = Nil } + +object NoWarn { + O.foo // nowarn + O.foo +: Nil // nowarn + def bar(a: Any, b: Any) = () // nowarn + bar(b = O.foo, a = ()) // nowarn +} + +object Warn { + type T = O.D + locally(null: O.D) + val x: O.D = null + locally(null.asInstanceOf[O.D]) +} diff --git a/test/files/run/t4542.check b/test/files/run/t4542.check index 5a8108dcbc..a53f31a3c7 100644 --- a/test/files/run/t4542.check +++ b/test/files/run/t4542.check @@ -9,9 +9,6 @@ defined class Foo scala> val f = new Foo <console>:8: warning: class Foo is deprecated: foooo val f = new Foo - ^ -<console>:8: warning: class Foo is deprecated: foooo - val f = new Foo ^ f: Foo = Bippy |