@@ -245,7 +245,7 @@ class Simplify extends MiniPhaseTransform with IdentityDenotTransformer {
245
245
case _ => fun
246
246
}
247
247
val constructor = a.symbol.owner.companionClass.primaryConstructor.asTerm
248
- evalReciever(a, rollInArgs(argss.tail, New (a.tpe.widenDealias, constructor, argss.head) ))
248
+ rollInArgs(argss.tail, New (a.tpe.widenDealias, constructor, argss.head))
249
249
250
250
// For synthetic dotty unapplies on case classes:
251
251
// - CC.unapply(arg): CC → arg
@@ -1226,9 +1226,11 @@ class Simplify extends MiniPhaseTransform with IdentityDenotTransformer {
1226
1226
}
1227
1227
visitType(valdef.symbol.info)
1228
1228
case t : New =>
1229
- val symIfExists = t.tpt.tpe.normalizedPrefix.termSymbol
1229
+ val normalized = t.tpt.tpe.normalizedPrefix
1230
+ val symIfExists = normalized.termSymbol
1230
1231
val b4 = used.getOrElseUpdate(symIfExists, 0 )
1231
1232
used.put(symIfExists, b4 + 1 )
1233
+ visitType(normalized)
1232
1234
1233
1235
case valdef : ValDef if valdef.symbol.exists && ! valdef.symbol.owner.isClass &&
1234
1236
! valdef.symbol.is(Param | Module | Lazy ) =>
@@ -1279,8 +1281,8 @@ class Simplify extends MiniPhaseTransform with IdentityDenotTransformer {
1279
1281
// TODO: if a non-synthetic val is duplicate of a synthetic one, rename a synthetic one and drop synthetic flag?
1280
1282
1281
1283
val copiesToReplaceAsUsedOnce =
1282
- timesUsed.filter(x => x._2 == 1 ).
1283
- flatMap(x => copies.get(x._1) match {
1284
+ timesUsed.filter(x => x._2 == 1 )
1285
+ . flatMap(x => copies.get(x._1) match {
1284
1286
case Some (tr) => List ((x._1, tr))
1285
1287
case None => Nil
1286
1288
}) -- timesUsedAsType.keySet
@@ -1289,7 +1291,7 @@ class Simplify extends MiniPhaseTransform with IdentityDenotTransformer {
1289
1291
1290
1292
val deepReplacer = new TreeMap () {
1291
1293
override def transform (tree : Tree )(implicit ctx : Context ): Tree = {
1292
- def loop (tree : Tree ): Tree =
1294
+ def loop (tree : Tree ): Tree =
1293
1295
tree match {
1294
1296
case t : RefTree if replacements.contains(t.symbol) =>
1295
1297
loop(replacements(t.symbol))
0 commit comments