Join GitHub today
It would be nice to have a rewrite that expands all sugars so that inferred type parameters/implicits are made explicit.
// before val x = List(1).map(_ + 1) x + "foobar" // after val x = List.apply[Int](1).map[Int, List[Int]](_ + 1)(scala.collection.immutable.List.canBuildFrom[Int]) scala.Predef.any2stringadd[List[Int]](x) + "foobar"
I took some first steps towards this rewrite here: https://github.com/scalacenter/scalafix/compare/master...olafurpg:expand-sugars?expand=1
While working on this I hit on
added a commit
Sep 15, 2017
This has become significantly easier with the
Rules like this will live in a separate repo however so they can evolve independently from Scalafix APIs.