Skip to content

Commit 3b5c510

Browse files
committed
Replace : _* with *
Mostly in comments, the rest was already done.
1 parent 52b2ec6 commit 3b5c510

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

compiler/src/dotty/tools/dotc/ast/MainProxies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object MainProxies {
2525
* try
2626
* f(
2727
* parseArgument[S](args, 0),
28-
* parseRemainingArguments[T](args, 1): _*
28+
* parseRemainingArguments[T](args, 1)*
2929
* )
3030
* catch case err: ParseError => showError(err)
3131
* }

compiler/src/dotty/tools/dotc/ast/TreeInfo.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ trait TreeInfo[T <: Untyped] { self: Trees.Instance[T] =>
245245
def allParamSyms(ddef: DefDef)(using Context): List[Symbol] =
246246
ddef.paramss.flatten.map(_.symbol)
247247

248-
/** Does this argument list end with an argument of the form <expr> : _* ? */
248+
/** Does this argument list end with an argument of the form <expr> * ? */
249249
def isWildcardStarArgList(trees: List[Tree])(using Context): Boolean =
250250
trees.nonEmpty && isWildcardStarArg(trees.last)
251251

compiler/src/dotty/tools/dotc/ast/untpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
616616
case _ => Ident(tree.name)
617617
}
618618

619-
/** A repeated argument such as `arg: _*` */
619+
/** A repeated argument such as `arg*` */
620620
def repeated(arg: Tree)(using Context): Typed = Typed(arg, Ident(tpnme.WILDCARD_STAR))
621621

622622

compiler/src/dotty/tools/dotc/config/PathResolver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ object PathResolver {
110110
// scalaLibDirFound match {
111111
// case Some(dir) if scalaHomeExists =>
112112
// val paths = ClassPath expandDir dir.path
113-
// join(paths: _*)
113+
// join(paths*)
114114
// case _ => ""
115115
// }
116116

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ class Definitions {
399399
* meth8(1) // OK (creates a primitive array and copies it into a reference array at Erasure)
400400
* val ai = Array[Int](1)
401401
* meth7(ai: _*) // OK (will copy the array at Erasure)
402-
* meth8(ai: _*) // OK (will copy the array at Erasure)
402+
* meth8(ai*) // OK (will copy the array at Erasure)
403403
*
404404
* Java repeated arguments are erased to arrays, so it would be safe to treat
405405
* them in the same way: add an `& Object` to the parameter type to disallow

compiler/src/dotty/tools/dotc/profile/FileUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import compiletime.uninitialized
3333
object FileUtils {
3434
def newAsyncBufferedWriter(path: Path, charset: Charset = StandardCharsets.UTF_8.nn, options: Array[OpenOption] = NO_OPTIONS, threadsafe: Boolean = false): LineWriter = {
3535
val encoder: CharsetEncoder = charset.newEncoder
36-
val writer = new OutputStreamWriter(Files.newOutputStream(path, options: _*), encoder)
36+
val writer = new OutputStreamWriter(Files.newOutputStream(path, options*), encoder)
3737
newAsyncBufferedWriter(new BufferedWriter(writer), threadsafe)
3838
}
3939
def newAsyncBufferedWriter(underlying: Writer, threadsafe: Boolean): LineWriter = {

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ trait Applications extends Compatibility {
501501
*/
502502
protected def addArg(arg: TypedArg, formal: Type): Unit
503503

504-
/** Is this an argument of the form `expr: _*` or a RepeatedParamType
504+
/** Is this an argument of the form `expr*` or a RepeatedParamType
505505
* derived from such an argument?
506506
*/
507507
protected def isVarArg(arg: Arg): Boolean

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
13071307
| pt.translateFromRepeated(toArray = true, translateWildcard = true)
13081308

13091309
def typedWildcardStarArgExpr = {
1310-
// A sequence argument `xs: _*` can be either a `Seq[T]` or an `Array[_ <: T]`,
1310+
// A sequence argument `xs*` can be either a `Seq[T]` or an `Array[_ <: T]`,
13111311
// irrespective of whether the method we're calling is a Java or Scala method,
13121312
// so the expected type is the union `Seq[T] | Array[_ <: T]`.
13131313
val ptArg = fromRepeated(pt)

compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ import dotty.tools.dotc.ast.TreeTypeMap
8888
* '{ e.super } =?= '{ p.super } ===> '{e} =?= '{p}
8989
*
9090
* /* Match varargs */
91-
* '{ e: _* } =?= '{ p: _* } ===> '{e} =?= '{p}
91+
* '{ e* } =?= '{ p* } ===> '{e} =?= '{p}
9292
*
9393
* /* Match val */
9494
* '{ val x: T = e1; e2 } =?= '{ val y: P = p1; p2 } ===> withEnv(x -> y)('[T] =?= '[P] &&& '{e1} =?= '{p1} &&& '{e2} =?= '{p2})

0 commit comments

Comments
 (0)