diff options
author | Martin Odersky <odersky@gmail.com> | 2016-03-18 11:33:34 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-03-18 12:25:48 +0100 |
commit | ef8c1968b2ea407c5b2ddca2fef00eb922e81f8e (patch) | |
tree | d6777f2de8569157ca816866ce33f13f57a0c7b1 /tests/repl/imports.check | |
parent | a7a0543d4e98319e70acc44510071ce2576077b8 (diff) | |
download | dotty-ef8c1968b2ea407c5b2ddca2fef00eb922e81f8e.tar.gz dotty-ef8c1968b2ea407c5b2ddca2fef00eb922e81f8e.tar.bz2 dotty-ef8c1968b2ea407c5b2ddca2fef00eb922e81f8e.zip |
Add test file
Diffstat (limited to 'tests/repl/imports.check')
-rw-r--r-- | tests/repl/imports.check | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/repl/imports.check b/tests/repl/imports.check new file mode 100644 index 000000000..3fa103283 --- /dev/null +++ b/tests/repl/imports.check @@ -0,0 +1,24 @@ +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 +<console>:11: error: type mismatch: + found : scala.collection.immutable.List[Int](o.xs) + required: String +buf += xs + ^ +<console>:11: error: type mismatch: + found : String + required: scala.collection.mutable.ListBuffer[Int] +buf += xs +^ +scala> buf ++= xs +res1: scala.collection.mutable.ListBuffer[Int] = ListBuffer(1, 2, 3) +scala> :quit |