summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2009-04-14 09:08:24 +0000
committerIulian Dragos <jaguarul@gmail.com>2009-04-14 09:08:24 +0000
commitb6512f17e744241f9d14d09794af86216bbccbf7 (patch)
treed6ef5c20df5d8f5fe903d63edeb4b3a5d772901c
parentad156169b5771607b84f44aeb02a3a7d556238bf (diff)
downloadscala-b6512f17e744241f9d14d09794af86216bbccbf7.tar.gz
scala-b6512f17e744241f9d14d09794af86216bbccbf7.tar.bz2
scala-b6512f17e744241f9d14d09794af86216bbccbf7.zip
Fixed conflict.
-rw-r--r--src/library/scala/collection/immutable/Stack.scala8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/library/scala/collection/immutable/Stack.scala b/src/library/scala/collection/immutable/Stack.scala
index 4826048309..bd0568ab26 100644
--- a/src/library/scala/collection/immutable/Stack.scala
+++ b/src/library/scala/collection/immutable/Stack.scala
@@ -48,7 +48,8 @@ class Stack[+A] extends Seq[A] {
* @param elem the element to push on the stack.
* @return the stack with the new element on top.
*/
- @deprecated def +[B >: A](elem: B): Stack[B] = new Node(elem)
+ @deprecated
+ def +[B >: A](elem: B): Stack[B] = new Node(elem)
/** Push an element on the stack.
*
@@ -63,7 +64,7 @@ class Stack[+A] extends Seq[A] {
* @param elems the element sequence.
* @return the stack with the new elements on top.
*/
- def push[B >: A](elems: B*): Stack[B] = this + elems
+ def push[B >: A](elem1: B, elem2: B, elems: B*): Stack[B] = this.push(elem1).push(elem2) ++ elems
/** Push all elements provided by the given iterable object onto
* the stack. The last element returned by the iterable object
@@ -74,7 +75,8 @@ class Stack[+A] extends Seq[A] {
* @param elems the iterable object.
* @return the stack with the new elements on top.
*/
- @deprecated def +[B >: A](elems: Iterable[B]): Stack[B] =
+ @deprecated
+ def +[B >: A](elems: Iterable[B]): Stack[B] =
elems.foldLeft(this: Stack[B]){ (stack, elem) => stack + elem }
/** Push all elements provided by the given iterable object onto