blob: 91c13a28cd7cc17cc4520ee7d99a7fafa3baa5f4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import collection._
// #4535
object Test {
def main(args: Array[String]) {
val as = new mutable.ArrayStack[Int]
as push 1
as push 2
as push 3
println(as.reverse)
as push 4
as push 5
as push 6
println(as.reverse)
println(as map { x => x })
for (i <- 0 until 100) {
as push i
assert(as == as.map(x => x))
assert(as == as.reverse.reverse)
}
}
}
|