upickle icon indicating copy to clipboard operation
upickle copied to clipboard

Doesn't work well with custom `apply` on case class

Open mio-19 opened this issue 5 months ago • 2 comments

Exception occurred while executing macro expansion.
scala.quoted.runtime.impl.ExprCastException: 
  Expected type: chester.syntax.core.Intersection
  Actual type: chester.syntax.core.Term
  Expression: chester.syntax.core.Intersection.apply(params.apply(0).asInstanceOf[scala.collection.immutable.Vector[chester.syntax.core.Term]])

I am having

case class Intersection(xs: Vector[Term]) extends Term derives ReadWriter {
...
}

object Intersection {
  def apply(xs: Vector[Term]): Term = ...

mio-19 avatar Sep 04 '24 04:09 mio-19