Skip to content

Commit 15398d7

Browse files
committed
Restore 2.12/2.13 cross-buildability for the scala corpus
Necessary after the transitional support for the old collections was removed from 2.13.x compiler: scala/scala#8517
1 parent 635f626 commit 15398d7

File tree

12 files changed

+34
-20
lines changed

12 files changed

+34
-20
lines changed

corpus/scala/df29ebb/compiler/scala/reflect/macros/runtime/JavaReflectionRuntimes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ trait JavaReflectionRuntimes {
3131
bundleCtor.newInstance(args.c)
3232
} else ReflectionUtils.staticSingletonInstance(implClass)
3333
val implArgs = if (isBundle) args.others else args.c +: args.others
34-
implMeth.invoke(implObj, implArgs.asInstanceOf[Seq[AnyRef]]: _*)
34+
implMeth.invoke(implObj, implArgs.asInstanceOf[Seq[AnyRef]].toList: _*)
3535
}
3636
}
3737
}

corpus/scala/df29ebb/compiler/scala/tools/nsc/Global.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
859859
informProgress(s"classpath updated on entries [${subst.keys mkString ","}]")
860860
def mkClassPath(elems: Iterable[ClassPath]): ClassPath =
861861
if (elems.size == 1) elems.head
862-
else AggregateClassPath.createAggregate(elems.toSeq: _*)
862+
else AggregateClassPath.createAggregate(elems.toList: _*)
863863
val oldEntries = mkClassPath(subst.keys)
864864
val newEntries = mkClassPath(subst.values)
865865
classPath match {
@@ -1205,7 +1205,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
12051205
val inclusions = ss.visibleSettings collect {
12061206
case s: ss.PhasesSetting if !(exclusions contains s) => s.value
12071207
}
1208-
checkPhaseSettings(including = true, inclusions.toSeq: _*)
1208+
checkPhaseSettings(including = true, inclusions.toList: _*)
12091209
checkPhaseSettings(including = false, exclusions map (_.value): _*)
12101210

12111211
phase = first //parserPhase

corpus/scala/df29ebb/compiler/scala/tools/nsc/classpath/AggregateClassPath.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ case class AggregateClassPath(aggregates: Seq[ClassPath]) extends ClassPath {
5959

6060
override def asClassPathStrings: Seq[String] = aggregates.map(_.asClassPathString).distinct
6161

62-
override def asSourcePathString: String = ClassPath.join(aggregates map (_.asSourcePathString): _*)
62+
override def asSourcePathString: String = ClassPath.join(aggregates.map(_.asSourcePathString).toList: _*)
6363

6464
override private[nsc] def packages(inPackage: String): Seq[PackageEntry] = {
6565
val aggregatedPackages = aggregates.flatMap(_.packages(inPackage)).distinct
@@ -84,7 +84,7 @@ case class AggregateClassPath(aggregates: Seq[ClassPath]) extends ClassPath {
8484
}
8585
}.unzip
8686
val distinctPackages = packages.flatten.distinct
87-
val distinctClassesAndSources = mergeClassesAndSources(classesAndSources: _*)
87+
val distinctClassesAndSources = mergeClassesAndSources(classesAndSources.toList: _*)
8888
ClassPathEntries(distinctPackages, distinctClassesAndSources)
8989
}
9090

corpus/scala/df29ebb/compiler/scala/tools/nsc/transform/patmat/Logic.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ trait Logic extends Debugging {
155155
implicit val SymOrdering: Ordering[Sym] = Ordering.by(_.id)
156156
}
157157

158-
def /\(props: Iterable[Prop]) = if (props.isEmpty) True else And(props.toSeq: _*)
159-
def \/(props: Iterable[Prop]) = if (props.isEmpty) False else Or(props.toSeq: _*)
158+
def /\(props: Iterable[Prop]) = if (props.isEmpty) True else And(props.toList: _*)
159+
def \/(props: Iterable[Prop]) = if (props.isEmpty) False else Or(props.toList: _*)
160160

161161
/**
162162
* Simplifies propositional formula according to the following rules:
@@ -219,7 +219,7 @@ trait Logic extends Debugging {
219219
opsFlattened match {
220220
case Seq() => True
221221
case Seq(f) => f
222-
case ops => And(ops: _*)
222+
case ops => And(ops.toList: _*)
223223
}
224224
}
225225
case Or(fv) =>
@@ -237,7 +237,7 @@ trait Logic extends Debugging {
237237
opsFlattened match {
238238
case Seq() => False
239239
case Seq(f) => f
240-
case ops => Or(ops: _*)
240+
case ops => Or(ops.toList: _*)
241241
}
242242
}
243243
case Not(Not(a)) =>
@@ -406,7 +406,7 @@ trait Logic extends Debugging {
406406

407407
if (Statistics.canEnable) Statistics.stopTimer(patmatAnaVarEq, start)
408408

409-
(And(eqAxioms: _*), pure)
409+
(And(eqAxioms.toList: _*), pure)
410410
}
411411

412412
type Solvable

corpus/scala/df29ebb/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ trait MatchAnalysis extends MatchApproximation {
489489
else {
490490
prefix += prefHead
491491
current = current.tail
492-
val and = And((current.head +: prefix): _*)
492+
val and = And((current.head +: prefix).toList: _*)
493493
val model = findModelFor(eqFreePropToSolvable(and))
494494

495495
// debug.patmat("trying to reach:\n"+ cnfString(current.head) +"\nunder prefix:\n"+ cnfString(prefix))

corpus/scala/df29ebb/compiler/scala/tools/nsc/util/ClassPath.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ trait ClassPath {
5050

5151
/** The whole classpath in the form of one String.
5252
*/
53-
def asClassPathString: String = ClassPath.join(asClassPathStrings: _*)
53+
def asClassPathString: String = ClassPath.join(asClassPathStrings.toList: _*)
5454
// for compatibility purposes
5555
@deprecated("use asClassPathString instead of this one", "2.11.5")
5656
def asClasspathString: String = asClassPathString

corpus/scala/df29ebb/library/scala/Predef.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,4 +599,6 @@ private[scala] abstract class LowPriorityImplicits {
599599
def apply(from: String) = immutable.IndexedSeq.newBuilder[T]
600600
def apply() = immutable.IndexedSeq.newBuilder[T]
601601
}
602+
603+
def copyArrayToImmutableIndexedSeq[T](xs: Array[T]): IndexedSeq[T] = ???
602604
}

corpus/scala/df29ebb/library/scala/collection/parallel/ParIterableLike.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ self: ParIterableLike[T, Repr, Sequential] =>
12861286
override def split = {
12871287
val pits = pit.splitWithSignalling
12881288
val sizes = pits.map(_.remaining)
1289-
val opits = othpit.psplitWithSignalling(sizes: _*)
1289+
val opits = othpit.psplitWithSignalling(sizes.toList: _*)
12901290
(pits zip opits) map { p => new Zip(pbf, p._1, p._2) }
12911291
}
12921292
override def merge(that: Zip[U, S, That]) = result = result combine that.result
@@ -1302,7 +1302,7 @@ self: ParIterableLike[T, Repr, Sequential] =>
13021302
override def split = if (pit.remaining <= len) {
13031303
val pits = pit.splitWithSignalling
13041304
val sizes = pits.map(_.remaining)
1305-
val opits = othpit.psplitWithSignalling(sizes: _*)
1305+
val opits = othpit.psplitWithSignalling(sizes.toList: _*)
13061306
((pits zip opits) zip sizes) map { t => new ZipAll(t._2, thiselem, thatelem, pbf, t._1._1, t._1._2) }
13071307
} else {
13081308
val opits = othpit.psplitWithSignalling(pit.remaining)

corpus/scala/df29ebb/library/scala/collection/parallel/RemainsIterator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ self =>
504504
def split: Seq[IterableSplitter[(T, S)]] = {
505505
val selfs = self.split
506506
val sizes = selfs.map(_.remaining)
507-
val thats = that.psplit(sizes: _*)
507+
val thats = that.psplit(sizes.toList: _*)
508508
(selfs zip thats) map { p => p._1 zipParSeq p._2 }
509509
}
510510
}

corpus/scala/df29ebb/library/scala/runtime/ScalaRunTime.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,18 @@ object ScalaRunTime {
257257
case _: UnsupportedOperationException | _: AssertionError => "" + arg
258258
}
259259
}
260+
type ArraySeq[T] = Seq[T]
261+
def genericWrapArray[T](xs: Array[T]): ArraySeq[T] = ???
262+
def wrapRefArray[T <: AnyRef](xs: Array[T]): ArraySeq[T] = ???
263+
def wrapIntArray(xs: Array[Int]): ArraySeq[Int] = ???
264+
def wrapDoubleArray(xs: Array[Double]): ArraySeq[Double] = ???
265+
def wrapLongArray(xs: Array[Long]): ArraySeq[Long] = ???
266+
def wrapFloatArray(xs: Array[Float]): ArraySeq[Float] = ???
267+
def wrapCharArray(xs: Array[Char]): ArraySeq[Char] = ???
268+
def wrapByteArray(xs: Array[Byte]): ArraySeq[Byte] = ???
269+
def wrapShortArray(xs: Array[Short]): ArraySeq[Short] = ???
270+
def wrapBooleanArray(xs: Array[Boolean]): ArraySeq[Boolean] = ???
271+
def wrapUnitArray(xs: Array[Unit]): ArraySeq[Unit] = ???
260272

261273
/** stringOf formatted for use in a repl result. */
262274
def replStringOf(arg: Any, maxElements: Int): String = {

0 commit comments

Comments
 (0)