You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using quicklens 1.4.11 and com.softwaremill.common tagging v 2.2.0. I'm unable to modify a value containing tagged datatypes. For example :
import com.softwaremill.tagging._
import com.softwaremill.quicklens._
case class A(data: String)
sealed trait B
type C = A @@ B
case class D(value: C)
val a: C = A("test").taggedWith[B]
val d = D(a)
d.modify(_.value.data).setTo("modified")
This does not compile :
[error] type mismatch;
[error] found : A
[error] required: C
[error] (which expands to) A with AnyRef{type Tag <: B}
[error] L145: d.modify(_.value.data).setTo("modified")
I understand why this doesn't compile but I was wondering if there is any way around this.
I also tried using shapeless tagging (it uses a trait instead of a type for tagging) but the issue remains.
Apologies if this has been asked before, I searched open & closed issues but could not find anything relevant.
The text was updated successfully, but these errors were encountered:
Hi,
I'm using quicklens 1.4.11 and com.softwaremill.common tagging v 2.2.0. I'm unable to modify a value containing tagged datatypes. For example :
This does not compile :
I understand why this doesn't compile but I was wondering if there is any way around this.
I also tried using shapeless tagging (it uses a trait instead of a type for tagging) but the issue remains.
Apologies if this has been asked before, I searched open & closed issues but could not find anything relevant.
The text was updated successfully, but these errors were encountered: