Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SI-9068 Deprecate scala.collection.mutable.Stack #5260

Merged
merged 1 commit into from Aug 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/library/scala/collection/mutable/Stack.scala
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions 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
Expand Down
4 changes: 3 additions & 1 deletion 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
Expand Down