aboutsummaryrefslogtreecommitdiff
path: root/tests/run/colltest5
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-06-02 16:10:42 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-27 19:28:36 +0200
commit50c80e83d301720795a40a2b3347dad45774e4e7 (patch)
tree33af52bc38976412ae7566908588188eb071f0d4 /tests/run/colltest5
parent216511fb74af60369c6049e0380b39898cf55e0a (diff)
downloaddotty-50c80e83d301720795a40a2b3347dad45774e4e7.tar.gz
dotty-50c80e83d301720795a40a2b3347dad45774e4e7.tar.bz2
dotty-50c80e83d301720795a40a2b3347dad45774e4e7.zip
Fix colltest5 test under separate compilation
This test failed before because strawman.collections.CollectionStrawMan5 is defined in two places: - src/strawman/collections/CollectionStrawMan5.scala - tests/run/colltest5/CollectionStrawMan5_1.scala The first will be compiled by scalac (unless the tests are run through a bootstrapped dotty) and the second will be compiled by dotty, the value class encoding of scalac and dotty are not binary compatible. This would not be a problem if we always used the `CollectionStrawMan5` coming from the partest output directory and ignored the one in the dotty sources, but which one gets picked depends on the classpath and whether compilation is joined or separate, see #1301. For now, it's safer and simpler to just avoid having tests which define a class that is also defined in the sources of dotty. Also, fix a bug in colltest4 where it was importing CollectionStrawMan5 instead of CollectionStrawMan4
Diffstat (limited to 'tests/run/colltest5')
-rw-r--r--tests/run/colltest5/CollectionStrawMan5_1.scala1
-rw-r--r--tests/run/colltest5/CollectionTests_2.scala2
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/run/colltest5/CollectionStrawMan5_1.scala b/tests/run/colltest5/CollectionStrawMan5_1.scala
index 1a89d9659..bb6ed4426 100644
--- a/tests/run/colltest5/CollectionStrawMan5_1.scala
+++ b/tests/run/colltest5/CollectionStrawMan5_1.scala
@@ -1,3 +1,4 @@
+package colltest5
package strawman.collections
import Predef.{augmentString => _, wrapString => _, _}
diff --git a/tests/run/colltest5/CollectionTests_2.scala b/tests/run/colltest5/CollectionTests_2.scala
index 0961180ed..1a0bf37ac 100644
--- a/tests/run/colltest5/CollectionTests_2.scala
+++ b/tests/run/colltest5/CollectionTests_2.scala
@@ -2,7 +2,7 @@ import Predef.{augmentString => _, wrapString => _, _}
import scala.reflect.ClassTag
object Test {
- import strawman.collections._
+ import colltest5.strawman.collections._
import CollectionStrawMan5._
def seqOps(xs: Seq[Int]) = {