aboutsummaryrefslogblamecommitdiff
path: root/tests/repl/imports.check
blob: 26b725637481f8229fbfbde7f4cbee757707a6e8 (plain) (tree)
1
2
3
4
5
6
7
8
9



                                                            
                                          



                 
                                                                                                                        




                                                               


                                                                    
scala> import scala.collection.mutable
import scala.collection.mutable
scala> val buf = mutable.ListBuffer[Int]()
buf: scala.collection.mutable.ListBuffer[Int] = ListBuffer()
scala> object o { val xs = List(1, 2, 3) }
defined module o
scala> import o._
import o._
scala> buf += xs
-- [E007] Type Mismatch Error: <console> -------------------------------------------------------------------------------
11 |buf += xs
   |       ^^
   |       found:    scala.collection.immutable.List[Int](o.xs)
   |       required: String
   |       
scala> buf ++= xs
res1: scala.collection.mutable.ListBuffer[Int] = ListBuffer(1, 2, 3)
scala> :quit