summaryrefslogblamecommitdiff
path: root/test/files/run/t4535.scala
blob: 91c13a28cd7cc17cc4520ee7d99a7fafa3baa5f4 (plain) (tree)
1
2
3
4
5
6
7
8






                   
 





                                        
 



                       
 
                              
 





                                      
 
 
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)
    }
  }

}