@@ -250,34 +250,6 @@ trait Stable212Base extends CrossCompatibility { self: SemanticRule =>
250
250
} else Patch .empty
251
251
}
252
252
253
- def extractCollection (toCol : Tree ): String = {
254
- toCol match {
255
- // case Term.ApplyType(q"scala.Predef.fallbackStringCanBuildFrom", _) =>
256
- // "scala.collection.immutable.IndexedSeq"
257
- // case Term.ApplyType(Term.Select(coll, _), _) =>
258
- // coll.syntax
259
- // case Term.Apply(Term.ApplyType(Term.Select(coll, _), _), _) =>
260
- // coll.syntax
261
- // case Term.Select(coll, _) =>
262
- // coll.syntax
263
- // case coll: Type.Name =>
264
- // coll.syntax
265
- case _ => {
266
- throw new Exception (
267
- s """ |cannot extract collection from .to
268
- |
269
- |---------------------------------------------
270
- |syntax:
271
- | ${toCol.syntax}
272
- |
273
- |---------------------------------------------
274
- |structure:
275
- | ${toCol.structure}""" .stripMargin
276
- )
277
- }
278
- }
279
- }
280
-
281
253
def replaceTo (ctx : RuleCtx ): Patch = {
282
254
val syntheticsByEndPos : Map [Int , Seq [Synthetic ]] =
283
255
ctx.index.synthetics.groupBy(_.position.end)
@@ -585,9 +557,6 @@ trait Stable212Base extends CrossCompatibility { self: SemanticRule =>
585
557
}
586
558
587
559
override def fix (ctx : RuleCtx ): Patch = {
588
- // println("-----")
589
- // ctx.index.synthetics.sortBy(_.position.start).foreach(println)
590
-
591
560
replaceTraversable(ctx) +
592
561
replaceCanBuildFrom(ctx) +
593
562
replaceTo(ctx) +
0 commit comments