Skip to content

Commit

Permalink
Disallow xs: _* vararg syntax and use xs* instead
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Nov 2, 2023
1 parent 1e95432 commit e5ec274
Show file tree
Hide file tree
Showing 87 changed files with 216 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
else
jliLambdaMetaFactoryMetafactoryHandle

bc.jmethod.visitInvokeDynamicInsn(methodName, desc, metafactory, bsmArgs: _*)
bc.jmethod.visitInvokeDynamicInsn(methodName, desc, metafactory, bsmArgs*)

generatedType
}
Expand Down
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ trait BCodeIdiomatic {
): Unit = {
jmethod.visitInvokeDynamicInsn(
"makeConcatWithConstants",
asm.Type.getMethodDescriptor(StringRef.toASMType, argTypes:_*),
asm.Type.getMethodDescriptor(StringRef.toASMType, argTypes*),
coreBTypes.jliStringConcatFactoryMakeConcatWithConstantsHandle,
(recipe +: constants):_*
(recipe +: constants)*
)
}

Expand Down Expand Up @@ -522,7 +522,7 @@ trait BCodeIdiomatic {
i += 1
}
assert(oldPos == keys.length, "emitSWITCH")
jmethod.visitTableSwitchInsn(keyMin, keyMax, defaultBranch, newBranches: _*)
jmethod.visitTableSwitchInsn(keyMin, keyMax, defaultBranch, newBranches*)
} else {
jmethod.visitLookupSwitchInsn(defaultBranch, keys, branches)
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/backend/jvm/BackendUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class BackendUtils(val postProcessor: PostProcessor) {
val mv = cw.visitMethod(ACC_PRIVATE + ACC_STATIC + ACC_SYNTHETIC, "$deserializeLambda$", serializedLamdaObjDesc, null, null)
def emitLambdaDeserializeIndy(targetMethods: Seq[Handle]): Unit = {
mv.visitVarInsn(ALOAD, 0)
mv.visitInvokeDynamicInsn("lambdaDeserialize", serializedLamdaObjDesc, jliLambdaDeserializeBootstrapHandle, targetMethods: _*)
mv.visitInvokeDynamicInsn("lambdaDeserialize", serializedLamdaObjDesc, jliLambdaDeserializeBootstrapHandle, targetMethods*)
}

val targetMethodGroupLimit = 255 - 1 - 3 // JVM limit. See See MAX_MH_ARITY in CallSite.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class ClassfileWriters(frontendAccess: PostProcessorFrontendAccess) {
val parent = filePath.getParent
if (!builtPaths.containsKey(parent)) {
parent.iterator.forEachRemaining(checkName)
try Files.createDirectories(parent, noAttributes: _*)
try Files.createDirectories(parent, noAttributes*)
catch {
case e: FileAlreadyExistsException =>
// `createDirectories` reports this exception if `parent` is an existing symlink to a directory
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ abstract class CoreBTypesFromSymbols[I <: DottyBackendInterface] extends CoreBTy
(List(LARRAY_LENGTH, LARRAY_GET, LARRAY_SET) map (_ -> LONG)) ++
(List(FARRAY_LENGTH, FARRAY_GET, FARRAY_SET) map (_ -> FLOAT)) ++
(List(DARRAY_LENGTH, DARRAY_GET, DARRAY_SET) map (_ -> DOUBLE)) ++
(List(OARRAY_LENGTH, OARRAY_GET, OARRAY_SET) map (_ -> ObjectRef)) : _*
(List(OARRAY_LENGTH, OARRAY_GET, OARRAY_SET) map (_ -> ObjectRef)) *
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ case class AggregateClassPath(aggregates: Seq[ClassPath]) extends ClassPath {

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

override def asSourcePathString: String = ClassPath.join(aggregates map (_.asSourcePathString): _*)
override def asSourcePathString: String = ClassPath.join(aggregates map (_.asSourcePathString)*)

override private[dotty] def packages(inPackage: PackageName): Seq[PackageEntry] = {
val aggregatedPackages = aggregates.flatMap(_.packages(inPackage)).distinct
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/config/Feature.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ object Feature:
val dependent = experimental("dependent")
val erasedDefinitions = experimental("erasedDefinitions")
val symbolLiterals = deprecated("symbolLiterals")
val ascriptionVarargsUnpacking = deprecated("ascriptionVarargsUnpacking")
val fewerBraces = experimental("fewerBraces")
val saferExceptions = experimental("saferExceptions")
val clauseInterleaving = experimental("clauseInterleaving")
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/config/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object Settings:
val OutputTag: ClassTag[AbstractFile] = ClassTag(classOf[AbstractFile])

class SettingsState(initialValues: Seq[Any]):
private val values = ArrayBuffer(initialValues: _*)
private val values = ArrayBuffer(initialValues*)
private var _wasRead: Boolean = false

override def toString: String = s"SettingsState(values: ${values.toList})"
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Contexts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ object Contexts {
* from constructor parameters to class parameter accessors.
*/
def superCallContext: Context = {
val locals = newScopeWith(owner.typeParams ++ owner.asClass.paramAccessors: _*)
val locals = newScopeWith(owner.typeParams ++ owner.asClass.paramAccessors*)
superOrThisCallContext(owner.primaryConstructor, locals)
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Flags.scala
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ object Flags {
flag
}

def commonFlags(flagss: FlagSet*): FlagSet = union(flagss.map(_.toCommonFlags): _*)
def commonFlags(flagss: FlagSet*): FlagSet = union(flagss.map(_.toCommonFlags)*)

/** The empty flag set */
val EmptyFlags: FlagSet = FlagSet(0)
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5956,7 +5956,7 @@ object Types {
val elems = scope.toList
val elems1 = mapOver(elems)
if (elems1 eq elems) scope
else newScopeWith(elems1: _*)
else newScopeWith(elems1*)
}

def mapOver(tree: Tree): Tree = treeTypeMap(tree)
Expand Down
13 changes: 7 additions & 6 deletions compiler/src/dotty/tools/dotc/parsing/Parsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2339,12 +2339,13 @@ object Parsers {
val isVarargSplice = location.inArgs && followingIsVararg()
in.nextToken()
if isVarargSplice then
report.errorOrMigrationWarning(
em"The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead${rewriteNotice(`future-migration`)}",
in.sourcePos(uscoreStart),
future)
if sourceVersion == `future-migration` then
patch(source, Span(t.span.end, in.lastOffset), " *")
if !in.featureEnabled(Feature.ascriptionVarargsUnpacking) then
report.errorOrMigrationWarning(
em"The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead${rewriteNotice(`3.4-migration`)}",
in.sourcePos(uscoreStart),
`3.4`)
if sourceVersion == `3.4-migration` then
patch(source, Span(t.span.end, in.lastOffset), "*")
else if opStack.nonEmpty then
report.errorOrMigrationWarning(
em"""`_*` can be used only for last argument of method application.
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/parsing/Tokens.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ abstract class TokensCommon {
type Token = Int
type TokenSet = BitSet

def tokenRange(lo: Int, hi: Int): TokenSet = BitSet(lo to hi: _*)
def tokenRange(lo: Int, hi: Int): TokenSet = BitSet(lo to hi *)

val tokenString, debugString: Array[String] = new Array[String](maxToken + 1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class SymbolicXMLBuilder(parser: Parser, preserveWS: Boolean)(using Context) {
import xmlterms.{_Null, __Elem, __Text, _buf, _md, _plus, _scope, _tmpscope, _xml}

// convenience methods
private def LL[A](x: A*): List[List[A]] = List(List(x:_*))
private def LL[A](x: A*): List[List[A]] = List(x.toList)
private def const(x: Any) = Literal(Constant(x))
private def wild = Ident(nme.WILDCARD)
private def wildStar = Ident(tpnme.WILDCARD_STAR)
Expand Down Expand Up @@ -220,7 +220,7 @@ class SymbolicXMLBuilder(parser: Parser, preserveWS: Boolean)(using Context) {
if (pre == null) (_scala_xml_UnprefixedAttribute, baseArgs)
else (_scala_xml_PrefixedAttribute , const(pre) :: baseArgs)

Assign(Ident(_md), New(clazz, LL(attrArgs: _*)))
Assign(Ident(_md), New(clazz, LL(attrArgs*)))
}

def handlePrefixedAttribute(pre: String, key: String, value: Tree) = mkAttributeTree(pre, key, value)
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/printing/Formatting.scala
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ object Formatting {
case Nil => ("", Nil)
}
val (args1, suffixes1) = args.lazyZip(suffixes).map(treatArg(_, _)).unzip
new StringContext(prefix :: suffixes1.toList: _*).s(args1: _*)
new StringContext(prefix :: suffixes1.toList*).s(args1*)
}
}

Expand Down
8 changes: 4 additions & 4 deletions compiler/src/dotty/tools/dotc/quoted/Interpreter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class Interpreter(pos: SrcPos, classLoader0: ClassLoader)(using Context):
val clazz = inst.getClass
val name = fn.name.asTermName
val method = getMethod(clazz, name, paramsSig(fn))
stopIfRuntimeException(method.invoke(inst, args: _*), method)
stopIfRuntimeException(method.invoke(inst, args*), method)
}

private def interpretedStaticFieldAccess(sym: Symbol): Object = {
Expand All @@ -186,8 +186,8 @@ class Interpreter(pos: SrcPos, classLoader0: ClassLoader)(using Context):
private def interpretNew(fn: Symbol, args: List[Object]): Object = {
val className = fn.owner.fullName.mangledString.replaceAll("\\$\\.", "\\$")
val clazz = loadClass(className)
val constr = clazz.getConstructor(paramsSig(fn): _*)
constr.newInstance(args: _*).asInstanceOf[Object]
val constr = clazz.getConstructor(paramsSig(fn)*)
constr.newInstance(args*).asInstanceOf[Object]
}

private def unexpectedTree(tree: Tree): Object =
Expand Down Expand Up @@ -218,7 +218,7 @@ class Interpreter(pos: SrcPos, classLoader0: ClassLoader)(using Context):


private def getMethod(clazz: Class[?], name: Name, paramClasses: List[Class[?]]): JLRMethod =
try clazz.getMethod(name.toString, paramClasses: _*)
try clazz.getMethod(name.toString, paramClasses*)
catch {
case _: NoSuchMethodException =>
val msg = em"Could not find method ${clazz.getCanonicalName}.$name with parameters ($paramClasses%, %)"
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ private class ExtractAPICollector(using Context) extends ThunkHolder {
case ExprType(resultType) =>
withMarker(apiType(resultType), byNameMarker)
case MatchType(bound, scrut, cases) =>
val s = combineApiTypes(apiType(bound) :: apiType(scrut) :: cases.map(apiType): _*)
val s = combineApiTypes(apiType(bound) :: apiType(scrut) :: cases.map(apiType)*)
withMarker(s, matchMarker)
case ConstantType(constant) =>
api.Constant.of(apiType(constant.tpe), constant.stringValue)
Expand Down
10 changes: 5 additions & 5 deletions compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ object SpaceEngine {
if (spaces.lengthCompare(1) <= 0 || spaces.lengthCompare(10) >= 0) spaces
else {
val res = spaces.map(sp => (sp, spaces.filter(_ ne sp))).find {
case (sp, sps) => isSubspace(sp, Or(LazyList(sps: _*)))
case (sp, sps) => isSubspace(sp, Or(LazyList(sps*)))
}
if (res.isEmpty) spaces
else res.get._2
Expand All @@ -158,7 +158,7 @@ object SpaceEngine {
/** Flatten space to get rid of `Or` for pretty print */
def flatten(space: Space)(using Context): Seq[Space] = space match {
case Prod(tp, fun, spaces) =>
val ss = LazyList(spaces: _*).map(flatten)
val ss = LazyList(spaces*).map(flatten)

ss.foldLeft(LazyList(Nil : List[Space])) { (acc, flat) =>
for { sps <- acc; s <- flat }
Expand All @@ -168,7 +168,7 @@ object SpaceEngine {
}

case Or(spaces) =>
LazyList(spaces: _*).flatMap(flatten)
LazyList(spaces*).flatMap(flatten)

case _ =>
List(space)
Expand Down Expand Up @@ -272,7 +272,7 @@ object SpaceEngine {
else if cache.forall(sub => isSubspace(sub.nn, Empty)) then Empty
else
// `(_, _, _) - (Some, None, _)` becomes `(None, _, _) | (_, Some, _) | (_, _, Empty)`
val spaces = LazyList(range: _*).flatMap { i =>
val spaces = LazyList(range*).flatMap { i =>
flatten(sub(i)).map(s => Prod(tp1, fun1, ss1.updated(i, s)))
}
Or(spaces)
Expand Down Expand Up @@ -483,7 +483,7 @@ object SpaceEngine {
case _ => tp
})

/** Space of the pattern: unapplySeq(a, b, c: _*)
/** Space of the pattern: unapplySeq(a, b, c*)
*/
def projectSeq(pats: List[Tree])(using Context): Space = {
if (pats.isEmpty) return Typ(defn.NilType, false)
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Namer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ class Namer { typer: Typer =>
.foreach(addForwarder(name, _, span)) // ignore if any are not added

def addWildcardForwarders(seen: List[TermName], span: Span): Unit =
val nonContextual = mutable.HashSet(seen: _*)
val nonContextual = mutable.HashSet(seen*)
val fromCaseClass = pathType.widen.classSymbols.exists(_.is(Case))
def isCaseClassSynthesized(mbr: Symbol) =
fromCaseClass && defn.caseClassSynthesized.contains(mbr)
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/io/ClassPath.scala
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ trait ClassPath {

/** The whole classpath in the form of one String.
*/
def asClassPathString: String = ClassPath.join(asClassPathStrings: _*)
def asClassPathString: String = ClassPath.join(asClassPathStrings*)
// for compatibility purposes
@deprecated("use asClassPathString instead of this one", "2.11.5")
def asClasspathString: String = asClassPathString
Expand Down Expand Up @@ -152,7 +152,7 @@ object ClassPath {
def join(paths: String*): String = paths.filterNot(_ == "").mkString(pathSeparator)

/** Split the classpath, apply a transformation function, and reassemble it. */
def map(cp: String, f: String => String): String = join(split(cp) map f: _*)
def map(cp: String, f: String => String): String = join(split(cp) map f*)

/** Expand path and possibly expanding stars */
def expandPath(path: String, expandStar: Boolean = true): List[String] =
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/io/Jar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Jar(file: File) {
finally in.close()
}
def jarWriter(mainAttrs: (Attributes.Name, String)*): JarWriter = {
new JarWriter(file, Jar.WManifest.apply(mainAttrs: _*).underlying)
new JarWriter(file, Jar.WManifest.apply(mainAttrs*).underlying)
}

def toList: List[JarEntry] = withJarInput { in =>
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/runner/ScalaClassLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class RichClassLoader(private val self: ClassLoader) extends AnyVal {
val method = clsToRun.getMethod("main", classOf[Array[String]])
if !Modifier.isStatic(method.getModifiers) then
throw new NoSuchMethodException(s"$objectName.main is not static")
try asContext(method.invoke(null, Array(arguments.toArray: AnyRef): _*))
try asContext(method.invoke(null, Array(arguments.toArray: AnyRef)*))
catch unwrapHandler({ case ex => throw ex })
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/scripting/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ object Main:
)
import dotty.tools.io.{Jar, Directory}
val jar = new Jar(jarPath)
val writer = jar.jarWriter(manifestAttributes:_*)
val writer = jar.jarWriter(manifestAttributes*)
try
writer.writeAllFrom(Directory(outDir))
finally
Expand Down
2 changes: 1 addition & 1 deletion compiler/test-resources/repl/i3966
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scala> val List(x: _*) = List(1, 2): @unchecked
scala> val List(x*) = List(1, 2): @unchecked
val x: Seq[Int] = List(1, 2)
2 changes: 1 addition & 1 deletion compiler/test/dotty/tools/CheckTypesTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CheckTypeTest extends DottyTest {
"List[B]"
)

checkTypes(source, types: _*) {
checkTypes(source, types*) {
case (List(a, b, lu, li, lr, ls, la, lb), context) =>
given Context = context

Expand Down
6 changes: 3 additions & 3 deletions compiler/test/dotty/tools/backend/jvm/ArrayApplyOptTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,23 @@ class ArrayApplyOptTest extends DottyBytecodeTest {

@Test def testArrayInlined = test(
"""{
| inline def array(inline xs: Int*): Array[Int] = Array(xs: _*)
| inline def array(inline xs: Int*): Array[Int] = Array(xs*)
| array(1, 2)
|}""".stripMargin,
newArray2Opcodes(T_INT, List(Op(DUP), Op(ICONST_0), Op(ICONST_1), Op(IASTORE), Op(DUP), Op(ICONST_1), Op(ICONST_2), Op(IASTORE), TypeOp(CHECKCAST, "[I")))
)

@Test def testArrayInlined2 = test(
"""{
| inline def array(inline x: Int, inline xs: Int*): Array[Int] = Array(x, xs: _*)
| inline def array(inline x: Int, inline xs: Int*): Array[Int] = Array(x, xs*)
| array(1, 2)
|}""".stripMargin,
newArray2Opcodes(T_INT, List(Op(DUP), Op(ICONST_0), Op(ICONST_1), Op(IASTORE), Op(DUP), Op(ICONST_1), Op(ICONST_2), Op(IASTORE)))
)

@Test def testArrayInlined3 = test(
"""{
| inline def array[T](inline xs: T*)(using inline ct: scala.reflect.ClassTag[T]): Array[T] = Array(xs: _*)
| inline def array[T](inline xs: T*)(using inline ct: scala.reflect.ClassTag[T]): Array[T] = Array(xs*)
| array(1, 2)
|}""".stripMargin,
newArray2Opcodes(T_INT, List(Op(DUP), Op(ICONST_0), Op(ICONST_1), Op(IASTORE), Op(DUP), Op(ICONST_1), Op(ICONST_2), Op(IASTORE), TypeOp(CHECKCAST, "[I")))
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/dotty/tools/backend/jvm/AsmConverters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ object ASMConverters {
case Jump(op, label) => method.visitJumpInsn(op, asmLabel(label))
case Ldc(op, cst) => method.visitLdcInsn(cst)
case LookupSwitch(op, dflt, keys, labels) => method.visitLookupSwitchInsn(asmLabel(dflt), keys.toArray, (labels map asmLabel).toArray)
case TableSwitch(op, min, max, dflt, labels) => method.visitTableSwitchInsn(min, max, asmLabel(dflt), (labels map asmLabel).toArray: _*)
case TableSwitch(op, min, max, dflt, labels) => method.visitTableSwitchInsn(min, max, asmLabel(dflt), (labels map asmLabel).toArray*)
case Invoke(op, owner, name, desc, itf) => method.visitMethodInsn(op, owner, name, desc, itf)
case InvokeDynamic(op, name, desc, bsm, bsmArgs) => method.visitInvokeDynamicInsn(name, desc, unconvertMethodHandle(bsm), unconvertBsmArgs(bsmArgs))
case NewArray(op, desc, dims) => method.visitMultiANewArrayInsn(desc, dims)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ class DottyBytecodeTests extends DottyBytecodeTest {
|import java.nio.file._
|class Test {
| def test(xs: Array[String]) = {
| val p4 = Paths.get("Hello", xs: _*)
| val p4 = Paths.get("Hello", xs*)
| }
|}
""".stripMargin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class BootstrappedOnlyCompilationTests {
if scala.util.Properties.isWin then basicTests
else compileDir("tests/old-tasty-interpreter-prototype", withTastyInspectorOptions) :: basicTests

aggregateTests(tests: _*).checkRuns()
aggregateTests(tests*).checkRuns()
}

@Test def runBootstrappedOnly: Unit = {
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/dotty/tools/dotc/IdempotencyTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class IdempotencyTests {
compileList(testDir.getName, sources.reverse, opt)(TestGroup("idempotency/orderIdempotency2"))
)
}
aggregateTests(tests: _*)
aggregateTests(tests*)
}

def check(name: String) = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class CommentPicklingTest {
val out = tmp./("out")
out.createDirectory()

val options = compileOptions.and("-d", out.toAbsolute.toString).and(sourceFiles: _*)
val options = compileOptions.and("-d", out.toAbsolute.toString).and(sourceFiles*)
val reporter = TestReporter.reporter(System.out, logLevel = ERROR)
Main.process(options.all, reporter)
assertFalse("Compilation failed.", reporter.hasErrors)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class SemanticdbTests:
val target = Files.createTempDirectory("semanticdb")
val javaArgs = Array("-d", target.toString) ++ javaFiles().map(_.toString)
val javac = ToolProvider.getSystemJavaCompiler
val exitJava = javac.run(null, null, null, javaArgs:_*)
val exitJava = javac.run(null, null, null, javaArgs*)
assert(exitJava == 0, "java compiler has errors")
val args = Array(
"-Xsemanticdb",
Expand Down
Loading

0 comments on commit e5ec274

Please sign in to comment.