Skip to content

Commit 44a22d7

Browse files
committed
SI-9068 Deprecate scala.collection.mutable.Stack
1 parent 961c8be commit 44a22d7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/library/scala/collection/mutable/Stack.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ object Stack extends SeqFactory[Stack] {
5454
* @define mayNotTerminateInf
5555
* @define willNotTerminateInf
5656
*/
57+
@deprecated("Stack is an inelegant and potentially poorly-performing wrapper around List. Use a List assigned to a var instead.", "2.12.0")
5758
class Stack[A] private (var elems: List[A])
5859
extends AbstractSeq[A]
5960
with Seq[A]

test/files/jvm/serialization-new.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
warning: there were two deprecation warnings (since 2.11.0)
2-
warning: there was one deprecation warning (since 2.12.0)
3-
warning: there were three deprecation warnings in total; re-run with -deprecation for details
2+
warning: there were three deprecation warnings (since 2.12.0)
3+
warning: there were 5 deprecation warnings in total; re-run with -deprecation for details
44
a1 = Array[1,2,3]
55
_a1 = Array[1,2,3]
66
arrayEquals(a1, _a1): true

test/files/run/collection-stacks.check

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
warning: there was one deprecation warning (since 2.11.0); re-run with -deprecation for details
1+
warning: there was one deprecation warning (since 2.11.0)
2+
warning: there were two deprecation warnings (since 2.12.0)
3+
warning: there were three deprecation warnings in total; re-run with -deprecation for details
24
3-2-1: true
35
3-2-1: true
46
apply

0 commit comments

Comments
 (0)