diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-10-18 07:13:17 -0700 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-10-18 07:13:17 -0700 |
commit | 5b2c4644a23ffbe1c45df40bf3511aee71eb0fe2 (patch) | |
tree | 92c4e81c74df149818162a7d3a77101128e0560c /test | |
parent | 2af071df1bdbb398e642e333823775c1e406c9be (diff) | |
parent | cd0f48c9567e9e52378c9c4c9b28e892bb2461a9 (diff) | |
download | scala-5b2c4644a23ffbe1c45df40bf3511aee71eb0fe2.tar.gz scala-5b2c4644a23ffbe1c45df40bf3511aee71eb0fe2.tar.bz2 scala-5b2c4644a23ffbe1c45df40bf3511aee71eb0fe2.zip |
Merge pull request #3041 from gkossakowski/merge-2.10.x
Merge 2.10.x into master
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 |