Permalink
Browse files

Fixes SI-5428.

  • Loading branch information...
axel22 committed May 24, 2012
1 parent e490b02 commit 4793c7bafac6c900d8044108a263f6967da871ee
Showing with 35 additions and 0 deletions.
  1. +5 −0 src/library/scala/collection/mutable/StackProxy.scala
  2. +1 −0 test/files/run/t5428.check
  3. +29 −0 test/files/run/t5428.scala
@@ -54,6 +54,11 @@ trait StackProxy[A] extends Stack[A] with Proxy {
this
}
override def push(elem: A): this.type = {
self.push(elem)
this
}
/** Returns the top element of the stack. This method will not remove
* the element from the stack. An error is signaled if there is no
* element on the stack.
@@ -0,0 +1 @@
Stack(8, 7, 6, 5, 4, 3)
View
@@ -0,0 +1,29 @@
import collection.mutable.{Stack, StackProxy}
class A extends StackProxy[Int] {
val self = Stack[Int]()
}
object Test {
def main(args: Array[String]) {
val a = new A
a push 3
a push 4
a push 5
a.push(6, 7, 8)
println(a)
a pop
}
}

0 comments on commit 4793c7b

Please sign in to comment.