Skip to content

Commit de53f84

Browse files
committed
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
1 parent 784f55a commit de53f84

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

tests/run/colltest4/CollectionStrawMan4_1.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package colltest4
12
package strawman.collections
23

34
import Predef.{augmentString => _, wrapString => _, _}

tests/run/colltest4/CollectionTests_2.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import Predef.{augmentString => _, wrapString => _, _}
22
import scala.reflect.ClassTag
33

44
object Test {
5-
import strawman.collections._
6-
import CollectionStrawMan5._
5+
import colltest4.strawman.collections._
6+
import CollectionStrawMan4._
77

88
def seqOps(xs: Seq[Int]) = {
99
val x1 = xs.foldLeft("")(_ + _)

tests/run/colltest5/CollectionStrawMan5_1.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package colltest5
12
package strawman.collections
23

34
import Predef.{augmentString => _, wrapString => _, _}

tests/run/colltest5/CollectionTests_2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Predef.{augmentString => _, wrapString => _, _}
22
import scala.reflect.ClassTag
33

44
object Test {
5-
import strawman.collections._
5+
import colltest5.strawman.collections._
66
import CollectionStrawMan5._
77

88
def seqOps(xs: Seq[Int]) = {

0 commit comments

Comments
 (0)