diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-06-02 16:10:42 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-27 19:28:36 +0200 |
commit | 50c80e83d301720795a40a2b3347dad45774e4e7 (patch) | |
tree | 33af52bc38976412ae7566908588188eb071f0d4 /tests/run | |
parent | 216511fb74af60369c6049e0380b39898cf55e0a (diff) | |
download | dotty-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')
-rw-r--r-- | tests/run/colltest4/CollectionStrawMan4_1.scala | 1 | ||||
-rw-r--r-- | tests/run/colltest4/CollectionTests_2.scala | 4 | ||||
-rw-r--r-- | tests/run/colltest5/CollectionStrawMan5_1.scala | 1 | ||||
-rw-r--r-- | tests/run/colltest5/CollectionTests_2.scala | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/tests/run/colltest4/CollectionStrawMan4_1.scala b/tests/run/colltest4/CollectionStrawMan4_1.scala index 874f67a2d..108d266ab 100644 --- a/tests/run/colltest4/CollectionStrawMan4_1.scala +++ b/tests/run/colltest4/CollectionStrawMan4_1.scala @@ -1,3 +1,4 @@ +package colltest4 package strawman.collections import Predef.{augmentString => _, wrapString => _, _} diff --git a/tests/run/colltest4/CollectionTests_2.scala b/tests/run/colltest4/CollectionTests_2.scala index 0961180ed..45da9d8a5 100644 --- a/tests/run/colltest4/CollectionTests_2.scala +++ b/tests/run/colltest4/CollectionTests_2.scala @@ -2,8 +2,8 @@ import Predef.{augmentString => _, wrapString => _, _} import scala.reflect.ClassTag object Test { - import strawman.collections._ - import CollectionStrawMan5._ + import colltest4.strawman.collections._ + import CollectionStrawMan4._ def seqOps(xs: Seq[Int]) = { val x1 = xs.foldLeft("")(_ + _) 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]) = { |