blob: b6d9ae8a7b014a6a220255d2c55dd1dc710adae6 (
plain) (
tree)
|
|
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> import util.foo
-- Error: <console> ----------------------------------------------------------------------------------------------------
8 |import util.foo
| ^^^
| foo is not a member of util
scala> import util.foo.bar
-- [E008] Member Not Found Error: <console> ----------------------------------------------------------------------------
8 |import util.foo.bar
| ^^^^^^^^
| value `foo` is not a member of util.type - did you mean `util.Left`?
scala> :quit
|