Skip to content

Migrate to Scala 3

Viktor Kuncak requested to merge github/fork/mario-bucev/migration-3.0 into scala-3.x

Created by: mario-bucev

Note: targets the scala-3.x branch. Notable changes:

  • implicit val are replaced by the new given/using feature. It more or less works the same as before, except that given instances must be explicitly brought in scope.
    • For instance, in Scala 2, import symbols._ would also bring the implicit Symbols instance in scope. With given/using, the given instance can be brought with import symbols.given
  • Early-initializer (e.g. new { val program: p.type = p } extends XYZ) are replaced by defining local classes overriding the fields in the early-initializer (e.g. class Impl(override val program: p.type) extends XYZ; new Impl(p))

Merge request reports