magnolia icon indicating copy to clipboard operation
magnolia copied to clipboard

Derivation for class with collection field

Open kubinio123 opened this issue 3 years ago • 2 comments

Trying to derive Show instance from test sources for a case class with List field ends up in compilation error.

In tests.scala

case class Attributes(a: String)
case class Entry(attributes: Attributes)
case class Response(entries: List[Entry])
test("construct a Show product instance") {
  val res = Show.derived[Response]
}

outputs:

[error] java.lang.AssertionError: assertion failed: <notype> class dotty.tools.dotc.ast.Trees$TypeTree -1

kubinio123 avatar Jan 18 '22 09:01 kubinio123

Oh no - that sounds like lampepfl/dotty#13406 - unfortunately I don't think anyone is working on it.

joroKr21 avatar Jan 18 '22 09:01 joroKr21

@joroKr21 Thanks for linking the issues - I've voted on it, if it makes any difference :)

adamw avatar Jan 18 '22 09:01 adamw