Skip to content

Commit 3102abc

Browse files
committed
Followup to #5203
1 parent 786e6da commit 3102abc

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ object Settings {
193193

194194
class SettingGroup {
195195

196-
private[this] val _allSettings: ArrayBuffer[Setting[_]] = new ArrayBuffer[Setting[_]]
196+
private[this] val _allSettings = new ArrayBuffer[Setting[_]]
197197
def allSettings: Seq[Setting[_]] = _allSettings
198198

199199
def defaultState: SettingsState = new SettingsState(allSettings map (_.default))

compiler/src/dotty/tools/dotc/parsing/Scanners.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ object Scanners {
8282

8383
/** A character buffer for literals
8484
*/
85-
protected val litBuf: mutable.StringBuilder = new StringBuilder
85+
protected val litBuf = new mutable.StringBuilder
8686

8787
/** append Unicode character to "litBuf" buffer
8888
*/
@@ -194,7 +194,7 @@ object Scanners {
194194
def getDocComment(pos: Int): Option[Comment] = docstringMap.get(pos)
195195

196196
/** A buffer for comments */
197-
private[this] val commentBuf: mutable.StringBuilder = new StringBuilder
197+
private[this] val commentBuf = new mutable.StringBuilder
198198

199199
private def handleMigration(keyword: Token): Token =
200200
if (!isScala2Mode) keyword

compiler/src/dotty/tools/dotc/printing/Highlighting.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ object Highlighting {
3131
}
3232

3333
case class HighlightBuffer(hl: Highlight)(implicit ctx: Context) {
34-
private[this] val buffer: mutable.ListBuffer[String] = new mutable.ListBuffer[String]
34+
private[this] val buffer = new mutable.ListBuffer[String]
3535

3636
buffer += hl.show
3737

compiler/src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Erasure extends Phase with DenotTransformer {
9090
ref.derivedSingleDenotation(ref.symbol, transformInfo(ref.symbol, ref.symbol.info))
9191
}
9292

93-
private val eraser: Erasure.Typer = new Erasure.Typer(this)
93+
private[this] val eraser = new Erasure.Typer(this)
9494

9595
def run(implicit ctx: Context): Unit = {
9696
val unit = ctx.compilationUnit

compiler/src/dotty/tools/dotc/transform/LazyVals.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class LazyVals extends MiniPhase with IdentityDenotTransformer {
2929
/** this map contains mutable state of transformation: OffsetDefs to be appended to companion object definitions,
3030
* and number of bits currently used */
3131
class OffsetInfo(var defs: List[Tree], var ord:Int)
32-
private[this] val appendOffsetDefs: mutable.Map[Symbol, OffsetInfo] = mutable.Map.empty[Symbol, OffsetInfo]
32+
private[this] val appendOffsetDefs = mutable.Map.empty[Symbol, OffsetInfo]
3333

3434
override def phaseName: String = "lazyVals"
3535

compiler/src/dotty/tools/dotc/transform/TreeChecker.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ class TreeChecker extends Phase with SymTransformer {
130130

131131
class Checker(phasesToCheck: Seq[Phase]) extends ReTyper with Checking {
132132

133-
private[this] val nowDefinedSyms: mutable.HashSet[Symbol] = new mutable.HashSet[Symbol]
134-
private[this] val everDefinedSyms: MutableSymbolMap[untpd.Tree] = newMutableSymbolMap[untpd.Tree]
133+
private[this] val nowDefinedSyms = new mutable.HashSet[Symbol]
134+
private[this] val everDefinedSyms = newMutableSymbolMap[untpd.Tree]
135135

136136
// don't check value classes after typer, as the constraint about constructors doesn't hold after transform
137137
override def checkDerivedValueClass(clazz: Symbol, stats: List[Tree])(implicit ctx: Context): Unit = ()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ class Namer { typer: Typer =>
840840

841841
val TypeDef(name, impl @ Template(constr, parents, self, _)) = original
842842

843-
private val ((params: List[Tree]), (rest: List[Tree])) = impl.body span {
843+
private val (params, rest): (List[Tree], List[Tree]) = impl.body.span {
844844
case td: TypeDef => td.mods is Param
845845
case vd: ValDef => vd.mods is ParamAccessor
846846
case _ => false

0 commit comments

Comments
 (0)