summaryrefslogblamecommitdiff
path: root/test/files/run/t4535.scala
blob: eba79431c9cf3350f545c85374ca6a432aec2ada (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)
    }
  }
  
}