summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Zeiger <szeiger@novocode.com>2016-07-05 16:58:21 +0200
committerStefan Zeiger <szeiger@novocode.com>2016-08-10 12:47:05 +0200
commit44a22d7cc0c315b9feaee1d4cb5df7a66578b1ea (patch)
tree0091fa37225cff4673297d0f1db5c1fde4890df0
parent961c8bea011559af65cfae9818d71ad35b6ecaf4 (diff)
downloadscala-44a22d7cc0c315b9feaee1d4cb5df7a66578b1ea.tar.gz
scala-44a22d7cc0c315b9feaee1d4cb5df7a66578b1ea.tar.bz2
scala-44a22d7cc0c315b9feaee1d4cb5df7a66578b1ea.zip
SI-9068 Deprecate scala.collection.mutable.Stack
-rw-r--r--src/library/scala/collection/mutable/Stack.scala1
-rw-r--r--test/files/jvm/serialization-new.check4
-rw-r--r--test/files/run/collection-stacks.check4
3 files changed, 6 insertions, 3 deletions
diff --git a/src/library/scala/collection/mutable/Stack.scala b/src/library/scala/collection/mutable/Stack.scala
index 1a92f23b7b..28d50af1f9 100644
--- a/src/library/scala/collection/mutable/Stack.scala
+++ b/src/library/scala/collection/mutable/Stack.scala
@@ -54,6 +54,7 @@ object Stack extends SeqFactory[Stack] {
* @define mayNotTerminateInf
* @define willNotTerminateInf
*/
+@deprecated("Stack is an inelegant and potentially poorly-performing wrapper around List. Use a List assigned to a var instead.", "2.12.0")
class Stack[A] private (var elems: List[A])
extends AbstractSeq[A]
with Seq[A]
diff --git a/test/files/jvm/serialization-new.check b/test/files/jvm/serialization-new.check
index 964c68e528..90da8a085d 100644
--- a/test/files/jvm/serialization-new.check
+++ b/test/files/jvm/serialization-new.check
@@ -1,6 +1,6 @@
warning: there were two deprecation warnings (since 2.11.0)
-warning: there was one deprecation warning (since 2.12.0)
-warning: there were three deprecation warnings in total; re-run with -deprecation for details
+warning: there were three deprecation warnings (since 2.12.0)
+warning: there were 5 deprecation warnings in total; re-run with -deprecation for details
a1 = Array[1,2,3]
_a1 = Array[1,2,3]
arrayEquals(a1, _a1): true
diff --git a/test/files/run/collection-stacks.check b/test/files/run/collection-stacks.check
index 826e3a87f8..cd87cc61e4 100644
--- a/test/files/run/collection-stacks.check
+++ b/test/files/run/collection-stacks.check
@@ -1,4 +1,6 @@
-warning: there was one deprecation warning (since 2.11.0); re-run with -deprecation for details
+warning: there was one deprecation warning (since 2.11.0)
+warning: there were two deprecation warnings (since 2.12.0)
+warning: there were three deprecation warnings in total; re-run with -deprecation for details
3-2-1: true
3-2-1: true
apply