softwaremill/quicklens

Scala 3 - modify cannot be used on a case class with an implicit parameter

OndrejSpanel opened this issue · 0 comments

Following code compiles fine in Scala 2, but does not in Scala 3:

import com.softwaremill.quicklens._

case class State(inside: Boolean)(implicit d: Double)

def f(state: State, value: Boolean): Unit = {
  implicit val dd: Double = 0
  state
    .modify(_.inside)
    .setTo(value)
}

Error is:

State has no member named copy$default$2

Scastie: https://scastie.scala-lang.org/nM12NLiDQDytEgdOXu4YZQ