softwaremill/quicklens

Compilation fails when trying to set value within newtype wrapper

ghostbuster91 opened this issue · 2 comments

given following code:

tx.modify(_.tokens.value).using(_ * conversionRate)

where tx is an object that holds value of type Token where:

  @newtype final case class Token(value: BigInt)

compilation fails with following error:

Unsupported path element. Path must have shape: _.field1.field2.each.field3.(...), got: `package`.this.Token.Ops$newtype(x$2.value)

Could you add a scala-cli/scastie snippet with the full reproduction? (scala version, library versions, etc.)

Yeah, I should've provided all these details right away 😅 I guess I was in hurry. I am not sure if I will be able to replicate it. Let's close it for now.