Skip to content

Commit b2feafe

Browse files
committed
Use ::: instead of ++ to concatenate Lists
1 parent a37dac6 commit b2feafe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+121
-121
lines changed

compiler/src/dotty/tools/MainGenericCompiler.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ object MainGenericCompiler {
125125
process(tail, settings.withCompiler)
126126
case ("-cp" | "-classpath" | "--class-path") :: cp :: tail =>
127127
val (tailargs, newEntries) = MainGenericRunner.processClasspath(cp, tail)
128-
process(tailargs, settings.copy(classPath = settings.classPath ++ newEntries.filter(_.nonEmpty)))
128+
process(tailargs, settings.copy(classPath = settings.classPath ::: newEntries.filter(_.nonEmpty)))
129129
case "-Oshort" :: tail =>
130130
// Nothing is to be done here. Request that the user adds the relevant flags manually.
131131
// i.e this has no effect when MainGenericRunner is invoked programatically.
@@ -150,7 +150,7 @@ object MainGenericCompiler {
150150
else List("-classpath", settings.classPath.mkString(classpathSeparator))
151151

152152
def reconstructedArgs() =
153-
classpathSetting ++ settings.scalaArgs ++ settings.residualArgs
153+
classpathSetting ::: settings.scalaArgs ::: settings.residualArgs
154154

155155
def addJavaProps(): Unit =
156156
settings.javaProps.foreach { (k, v) => sys.props(k) = v }
@@ -172,8 +172,8 @@ object MainGenericCompiler {
172172
addJavaProps()
173173
val properArgs =
174174
reconstructedArgs()
175-
++ List("-script", settings.targetScript)
176-
++ settings.scriptArgs
175+
::: List("-script", settings.targetScript)
176+
::: settings.scriptArgs
177177
scripting.Main.main(properArgs.toArray)
178178
case CompileMode.Repl | CompileMode.Run =>
179179
addJavaProps()

compiler/src/dotty/tools/MainGenericRunner.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ object MainGenericRunner {
110110
// globdir is wildcard directory for globbed jar files, reconstruct the intended classpath
111111
val cpJars = tail.takeWhile( f => validGlobbedJar(f) )
112112
val remainingArgs = tail.drop(cpJars.size)
113-
(remainingArgs, cpEntries ++ cpJars)
113+
(remainingArgs, cpEntries ::: cpJars)
114114
else
115115
(tail, cpEntries)
116116

@@ -125,7 +125,7 @@ object MainGenericRunner {
125125
processArgs(tail, settings.withExecuteMode(ExecuteMode.Run).withTargetToRun(fqName))
126126
case ("-cp" | "-classpath" | "--class-path") :: cp :: tail =>
127127
val (tailargs, newEntries) = processClasspath(cp, tail)
128-
processArgs(tailargs, settings.copy(classPath = settings.classPath ++ newEntries.filter(_.nonEmpty)))
128+
processArgs(tailargs, settings.copy(classPath = settings.classPath ::: newEntries.filter(_.nonEmpty)))
129129
case ("-version" | "--version") :: _ =>
130130
settings.copy(
131131
executeMode = ExecuteMode.Repl,
@@ -148,7 +148,7 @@ object MainGenericRunner {
148148
case (o @ javaOption(striped)) :: tail =>
149149
processArgs(tail, settings.withJavaArgs(striped).withScalaArgs(o))
150150
case (o @ scalaOption(_*)) :: tail =>
151-
val remainingArgs = (CommandLineParser.expandArg(o) ++ tail).toList
151+
val remainingArgs = (CommandLineParser.expandArg(o) ::: tail).toList
152152
processArgs(remainingArgs, settings)
153153
case (o @ colorOption(_*)) :: tail =>
154154
processArgs(tail, settings.withScalaArgs(o))
@@ -189,7 +189,7 @@ object MainGenericRunner {
189189
case ExecuteMode.Repl =>
190190
val properArgs =
191191
List("-classpath", settings.classPath.mkString(classpathSeparator)).filter(Function.const(settings.classPath.nonEmpty))
192-
++ settings.residualArgs
192+
::: settings.residualArgs
193193
repl.Main.main(properArgs.toArray)
194194
None
195195

@@ -242,11 +242,11 @@ object MainGenericRunner {
242242
else
243243
val properArgs =
244244
List("-classpath", settings.classPath.mkString(classpathSeparator)).filter(Function.const(settings.classPath.nonEmpty))
245-
++ settings.residualArgs
246-
++ (if settings.save then List("-save") else Nil)
247-
++ settings.scalaArgs
248-
++ List("-script", settings.targetScript)
249-
++ settings.scriptArgs
245+
::: settings.residualArgs
246+
::: (if settings.save then List("-save") else Nil)
247+
::: settings.scalaArgs
248+
::: List("-script", settings.targetScript)
249+
::: settings.scriptArgs
250250
scripting.Main.process(properArgs.toArray)
251251

252252
case ExecuteMode.Expression =>
@@ -255,7 +255,7 @@ object MainGenericRunner {
255255
case list => list.mkString(classpathSeparator)
256256
}
257257
val cpArgs = if cp.isEmpty then Nil else List("-classpath", cp)
258-
val properArgs = cpArgs ++ settings.residualArgs ++ settings.scalaArgs
258+
val properArgs = cpArgs ::: settings.residualArgs ::: settings.scalaArgs
259259
val driver = StringDriver(properArgs.toArray, settings.targetExpression)
260260
driver.compileAndRun(settings.classPath)
261261

compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I, val frontendAcce
151151
else Nil
152152
}
153153

154-
nestedClasses ++ companionModuleMembers
154+
nestedClasses ::: companionModuleMembers
155155
}
156156

157157
/**

compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,14 @@ abstract class CoreBTypesFromSymbols[I <: DottyBackendInterface] extends CoreBTy
220220
lazy val typeOfArrayOp: Map[Int, BType] = {
221221
import dotty.tools.backend.ScalaPrimitivesOps._
222222
Map(
223-
(List(ZARRAY_LENGTH, ZARRAY_GET, ZARRAY_SET) map (_ -> BOOL)) ++
224-
(List(BARRAY_LENGTH, BARRAY_GET, BARRAY_SET) map (_ -> BYTE)) ++
225-
(List(SARRAY_LENGTH, SARRAY_GET, SARRAY_SET) map (_ -> SHORT)) ++
226-
(List(CARRAY_LENGTH, CARRAY_GET, CARRAY_SET) map (_ -> CHAR)) ++
227-
(List(IARRAY_LENGTH, IARRAY_GET, IARRAY_SET) map (_ -> INT)) ++
228-
(List(LARRAY_LENGTH, LARRAY_GET, LARRAY_SET) map (_ -> LONG)) ++
229-
(List(FARRAY_LENGTH, FARRAY_GET, FARRAY_SET) map (_ -> FLOAT)) ++
230-
(List(DARRAY_LENGTH, DARRAY_GET, DARRAY_SET) map (_ -> DOUBLE)) ++
223+
(List(ZARRAY_LENGTH, ZARRAY_GET, ZARRAY_SET) map (_ -> BOOL)) :::
224+
(List(BARRAY_LENGTH, BARRAY_GET, BARRAY_SET) map (_ -> BYTE)) :::
225+
(List(SARRAY_LENGTH, SARRAY_GET, SARRAY_SET) map (_ -> SHORT)) :::
226+
(List(CARRAY_LENGTH, CARRAY_GET, CARRAY_SET) map (_ -> CHAR)) :::
227+
(List(IARRAY_LENGTH, IARRAY_GET, IARRAY_SET) map (_ -> INT)) :::
228+
(List(LARRAY_LENGTH, LARRAY_GET, LARRAY_SET) map (_ -> LONG)) :::
229+
(List(FARRAY_LENGTH, FARRAY_GET, FARRAY_SET) map (_ -> FLOAT)) :::
230+
(List(DARRAY_LENGTH, DARRAY_GET, DARRAY_SET) map (_ -> DOUBLE)) :::
231231
(List(OARRAY_LENGTH, OARRAY_GET, OARRAY_SET) map (_ -> ObjectRef)) : _*
232232
)
233233
}

compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ class JSCodeGen()(using genCtx: Context) {
380380
}
381381

382382
// Generate fields and add to methods + ctors
383-
val generatedMembers = genClassFields(td) ++ generatedNonFieldMembers.toList
383+
val generatedMembers = genClassFields(td) ::: generatedNonFieldMembers.toList
384384

385385
// Generate member exports
386386
val memberExports = jsExportsGen.genMemberExports(sym)
@@ -1346,12 +1346,12 @@ class JSCodeGen()(using genCtx: Context) {
13461346
}
13471347

13481348
ifOverload(tree, js.Block(
1349-
inner ++ tree.ctor.beforeCall ++ captureAssigns ++ normalAssigns))
1349+
inner ::: tree.ctor.beforeCall ::: captureAssigns ::: normalAssigns))
13501350
}
13511351

13521352
def postStats(tree: ConstructorTree[SplitSecondaryJSCtor]): js.Tree = {
13531353
val inner = tree.subCtors.map(postStats(_))
1354-
ifOverload(tree, js.Block(tree.ctor.afterCall ++ inner))
1354+
ifOverload(tree, js.Block(tree.ctor.afterCall ::: inner))
13551355
}
13561356

13571357
val primaryCtor = ctorTree.ctor

compiler/src/dotty/tools/dotc/Run.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
338338
SourceFile.virtual(name, source)
339339
}
340340
val sources =
341-
scalaSources.map(sourceFile(_, isJava = false)) ++
341+
scalaSources.map(sourceFile(_, isJava = false)) :::
342342
javaSources.map(sourceFile(_, isJava = true))
343343

344344
compileSources(sources)

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ object desugar {
418418
case evidenceParams =>
419419
val paramss1 = meth.paramss.reverse match
420420
case ValDefs(vparams @ (vparam :: _)) :: rparamss if vparam.mods.isOneOf(GivenOrImplicit) =>
421-
((evidenceParams ++ vparams) :: rparamss).reverse
421+
((evidenceParams ::: vparams) :: rparamss).reverse
422422
case _ =>
423423
meth.paramss :+ evidenceParams
424424
cpy.DefDef(meth)(paramss = paramss1)
@@ -886,7 +886,7 @@ object desugar {
886886
val originalVparamsIt = originalVparamss.iterator.flatten
887887
derivedVparamss match {
888888
case first :: rest =>
889-
first.map(_.withMods(originalVparamsIt.next().mods | caseAccessor)) ++
889+
first.map(_.withMods(originalVparamsIt.next().mods | caseAccessor)) :::
890890
rest.flatten.map(_.withMods(originalVparamsIt.next().mods))
891891
case _ =>
892892
Nil
@@ -987,7 +987,7 @@ object desugar {
987987

988988
def badRightAssoc(problem: String) =
989989
report.error(em"right-associative extension method $problem", mdef.srcPos)
990-
extParamss ++ mdef.paramss
990+
extParamss ::: mdef.paramss
991991

992992
rightParam match
993993
case ValDefs(vparam :: Nil) =>
@@ -1009,9 +1009,9 @@ object desugar {
10091009
badRightAssoc("must start with a single parameter")
10101010
case _ =>
10111011
// no value parameters, so not an infix operator.
1012-
extParamss ++ mdef.paramss
1012+
extParamss ::: mdef.paramss
10131013
else
1014-
extParamss ++ mdef.paramss
1014+
extParamss ::: mdef.paramss
10151015
).withMods(mdef.mods | ExtensionMethod)
10161016

10171017
/** Transform extension construct to list of extension methods */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ object MainProxies {
1414

1515
/** Generate proxy classes for @main functions and @myMain functions where myMain <:< MainAnnotation */
1616
def proxies(stats: List[tpd.Tree])(using Context): List[untpd.Tree] = {
17-
mainAnnotationProxies(stats) ++ mainProxies(stats)
17+
mainAnnotationProxies(stats) ::: mainProxies(stats)
1818
}
1919

2020
/** Generate proxy classes for @main functions.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ class TreeTypeMap(
190190
copy(
191191
typeMap,
192192
treeMap,
193-
from ++ oldOwners,
194-
to ++ newOwners,
195-
from ++ substFrom,
196-
to ++ substTo)
193+
from ::: oldOwners,
194+
to ::: newOwners,
195+
from ::: substFrom,
196+
to ::: substTo)
197197
}
198198

199199
/** Apply `typeMap` and `ownerMap` to given symbols `syms`

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ object Trees {
18481848
def joinParams(tparams: List[TypeDef], paramss: List[ParamClause]): List[ParamClause] =
18491849
if tparams.isEmpty then paramss
18501850
else paramss match
1851-
case TypeDefs(tparams1) :: paramss1 => (tparams ++ tparams1) :: paramss1
1851+
case TypeDefs(tparams1) :: paramss1 => (tparams ::: tparams1) :: paramss1
18521852
case _ => tparams :: paramss
18531853

18541854
def isTermOnly(paramss: List[ParamClause]): Boolean = paramss match

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
342342
val findLocalDummy = FindLocalDummyAccumulator(cls)
343343
val localDummy = body.foldLeft(NoSymbol: Symbol)(findLocalDummy.apply)
344344
.orElse(newLocalDummy(cls))
345-
val impl = untpd.Template(constr, parents, Nil, selfType, newTypeParams ++ body)
345+
val impl = untpd.Template(constr, parents, Nil, selfType, newTypeParams ::: body)
346346
.withType(localDummy.termRef)
347347
ta.assignType(untpd.TypeDef(cls.name, impl), cls)
348348
}
@@ -368,7 +368,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
368368
if !overridden.is(Deferred) then fwdMeth.setFlag(Override)
369369
DefDef(fwdMeth, ref(fn).appliedToArgss(_))
370370
}
371-
termForwarders.map((name, sym) => forwarder(name, sym)) ++
371+
termForwarders.map((name, sym) => forwarder(name, sym)) :::
372372
typeMembers.map((name, info) => TypeDef(newSymbol(cls, name, Synthetic, info).entered))
373373
}
374374
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
431431
def TypeDef(name: TypeName, rhs: Tree)(implicit src: SourceFile): TypeDef = new TypeDef(name, rhs)
432432
def Template(constr: DefDef, parents: List[Tree], derived: List[Tree], self: ValDef, body: LazyTreeList)(implicit src: SourceFile): Template =
433433
if (derived.isEmpty) new Template(constr, parents, self, body)
434-
else new DerivingTemplate(constr, parents ++ derived, self, body, derived.length)
434+
else new DerivingTemplate(constr, parents ::: derived, self, body, derived.length)
435435
def Template(constr: DefDef, parents: LazyTreeList, self: ValDef, body: LazyTreeList)(implicit src: SourceFile): Template =
436436
new Template(constr, parents, self, body)
437437
def Import(expr: Tree, selectors: List[ImportSelector])(implicit src: SourceFile): Import = new Import(expr, selectors)

compiler/src/dotty/tools/dotc/cc/CaptureSet.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ object CaptureSet:
951951
parent <- cinfo.parents if parent.classSymbol == defn.RetainingClass
952952
arg <- parent.argInfos
953953
yield captureSetOf(arg)
954-
css.foldLeft(empty)(_ ++ _)
954+
css.foldLeft(empty)(_ ::: _)
955955
*/
956956

957957
/** The capture set of the type underlying a CaptureRef */

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ object Settings:
9393
val value0 = value.asInstanceOf[List[String]]
9494
val current = valueIn(sstate).asInstanceOf[List[String]]
9595
value0.filter(current.contains).foreach(s => dangers :+= s"Setting $name set to $s redundantly")
96-
current ++ value0
96+
current ::: value0
9797
else
9898
if changed then dangers :+= s"Flag $name set repeatedly"
9999
value
@@ -248,7 +248,7 @@ object Settings:
248248
case Nil =>
249249
checkDependencies(stateWithArgs(skipped))
250250
case "--" :: args =>
251-
checkDependencies(stateWithArgs(skipped ++ args))
251+
checkDependencies(stateWithArgs(skipped ::: args))
252252
case x :: _ if x startsWith "-" =>
253253
@tailrec def loop(settings: List[Setting[?]]): ArgsSummary = settings match
254254
case setting :: settings1 =>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ object Contexts {
405405
* from constructor parameters to class parameter accessors.
406406
*/
407407
def superCallContext: Context = {
408-
val locals = newScopeWith(owner.typeParams ++ owner.asClass.paramAccessors: _*)
408+
val locals = newScopeWith(owner.typeParams ::: owner.asClass.paramAccessors: _*)
409409
superOrThisCallContext(owner.primaryConstructor, locals)
410410
}
411411

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,13 +2115,13 @@ class Definitions {
21152115
NothingClass,
21162116
SingletonClass)
21172117

2118-
@tu lazy val syntheticCoreClasses: List[Symbol] = syntheticScalaClasses ++ List(
2118+
@tu lazy val syntheticCoreClasses: List[Symbol] = syntheticScalaClasses ::: List(
21192119
EmptyPackageVal,
21202120
OpsPackageClass)
21212121

21222122
/** Lists core methods that don't have underlying bytecode, but are synthesized on-the-fly in every reflection universe */
21232123
@tu lazy val syntheticCoreMethods: List[TermSymbol] =
2124-
AnyMethods ++ ObjectMethods ++ List(String_+, throwMethod)
2124+
AnyMethods ::: ObjectMethods ::: List(String_+, throwMethod)
21252125

21262126
@tu lazy val reservedScalaClassNames: Set[Name] = syntheticScalaClasses.map(_.name).toSet
21272127

@@ -2132,7 +2132,7 @@ class Definitions {
21322132
if (!isInitialized) {
21332133
// force initialization of every symbol that is synthesized or hijacked by the compiler
21342134
val forced =
2135-
syntheticCoreClasses ++ syntheticCoreMethods ++ ScalaValueClasses() :+ JavaEnumClass
2135+
syntheticCoreClasses ::: syntheticCoreMethods ++ ScalaValueClasses() :+ JavaEnumClass
21362136
isInitialized = true
21372137
}
21382138
addSyntheticSymbolsComments

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@ object Denotations {
12591259
def current(using Context): Denotation =
12601260
derivedUnionDenotation(denot1.current, denot2.current)
12611261
def altsWith(p: Symbol => Boolean): List[SingleDenotation] =
1262-
denot1.altsWith(p) ++ denot2.altsWith(p)
1262+
denot1.altsWith(p) ::: denot2.altsWith(p)
12631263
def suchThat(p: Symbol => Boolean)(using Context): SingleDenotation = {
12641264
val sd1 = denot1.suchThat(p)
12651265
val sd2 = denot2.suchThat(p)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
12021202
if d > 0 then
12031203
val initialArgs = otherArgs.take(d)
12041204
/** The arguments passed to `otherTycon` in the body of `tl` */
1205-
def bodyArgs(tl: HKTypeLambda) = initialArgs ++ tl.paramRefs
1205+
def bodyArgs(tl: HKTypeLambda) = initialArgs ::: tl.paramRefs
12061206
/** The bounds of the type parameters of `tl` */
12071207
def adaptedBounds(tl: HKTypeLambda) =
12081208
val bodyArgsComputed = bodyArgs(tl)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ class TypeErasure(sourceLanguage: SourceLanguage, semiEraseVCs: Boolean, isConst
701701
val formals = formals0.mapConserve(paramErasure)
702702
eraseResult(tp.resultType) match {
703703
case rt: MethodType =>
704-
tp.derivedLambdaType(names ++ rt.paramNames, formals ++ rt.paramInfos, rt.resultType)
704+
tp.derivedLambdaType(names ::: rt.paramNames, formals ::: rt.paramInfos, rt.resultType)
705705
case NoType =>
706706
// Can happen if we smuggle in a Nothing in the qualifier. Normally we prevent that
707707
// in Checking.checkMembersOK, but compiler-generated code can bypass this test.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4319,8 +4319,8 @@ object Types {
43194319
case t => mapOver(t)
43204320
}
43214321
}
4322-
PolyType(paramNames ++ that.paramNames)(
4323-
x => this.paramInfos.mapConserve(_.subst(this, x).bounds) ++
4322+
PolyType(paramNames ::: that.paramNames)(
4323+
x => this.paramInfos.mapConserve(_.subst(this, x).bounds) :::
43244324
that.paramInfos.mapConserve(shiftedSubst(x)(_).bounds),
43254325
x => shiftedSubst(x)(that.resultType).subst(this, x))
43264326
case _ => this

compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ class TreeUnpickler(reader: TastyReader,
10621062

10631063
val lazyStats = readLater(end, rdr => {
10641064
val stats = rdr.readIndexedStats(localDummy, end)
1065-
tparams ++ vparams ++ stats
1065+
tparams ::: vparams ::: stats
10661066
})
10671067
defn.patchStdLibClass(cls)
10681068
NamerOps.addConstructorProxies(cls)

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
11151115
val cls = symbol.asClass
11161116
val ((constr: DefDef) :: Nil, stats) =
11171117
impl.body.partition(_.symbol == cls.primaryConstructor): @unchecked
1118-
ClassDef(cls, constr, tparams ++ stats)
1118+
ClassDef(cls, constr, tparams ::: stats)
11191119

11201120
case MODULEtree =>
11211121
setSymModsName()

compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ object PrepareInlineable {
182182

183183
val (leadingTypeArgs, otherArgss) = splitArgs(argss)
184184
val argss1 = joinArgs(
185-
localRefs.map(TypeTree(_)) ++ leadingTypeArgs, // TODO: pass type parameters in two sections?
185+
localRefs.map(TypeTree(_)) ::: leadingTypeArgs, // TODO: pass type parameters in two sections?
186186
(qual :: Nil) :: otherArgss
187187
)
188188
ref(accessor).appliedToArgss(argss1).withSpan(tree.span)

compiler/src/dotty/tools/dotc/plugins/Plugins.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ object Plugins {
267267
}
268268

269269
insertedPhase = insertedPhase + phase.phaseName
270-
updatedPlan = before ++ (List(phase) :: after)
270+
updatedPlan = before ::: (List(phase) :: after)
271271
}
272272

273273
updatedPlan

0 commit comments

Comments
 (0)