Closed hejfelix closed 7 years ago
Thanks! Reproduced like so:
sealed trait AST
case class Integer(i: Int) extends AST
case class Application(tree: AST, method: String) extends AST
implicit val c = ToRefTree.DerivationConfig[Integer].rename("Bob").omitField("i")
render(Application(Integer(8), "x"))
Probably something is wrong in the coproduct derivation code.
Actually, render(Integer(8): AST)
is enough to reproduce this.
@hejfelix Just released 1.1.0-20170618
with a fix, could you try it?
fixed 👍
So I'm generating these two images from the code below:
"integer.png"
"application_with_integer"
In the first case, my integer case class is correctly renamed to bob. In the second case, no renaming happens.
I am not sure if I am using the API correctly, but I can see that the "i" field is omitted in both cases, i.e. some of the options must be picked up in both cases.