quicklens icon indicating copy to clipboard operation
quicklens copied to clipboard

Setting a Double field using a Int doesn't work in Scala3

Open adamw opened this issue 2 years ago • 1 comments

To reproduce:

case class X(a: Double)
X(0).modify(_.a).setTo(1)

Originally reported as part of #114

adamw avatar Sep 11 '22 18:09 adamw

Hmmm, this might be impossible to solve on quicklens side, since this seems to be a change (or bug) in type inference. Scala 3 ifers [X, AnyVal], when Scala 2 inferred [X, Double]

scastie with -Xprint:typer: https://scastie.scala-lang.org/KacperFKorban/oOOuhGD6RmagHFbyIozIyQ/4

KacperFKorban avatar Sep 11 '22 19:09 KacperFKorban