tek / splain

better implicit errors for scala
MIT License
370 stars 28 forks source link

Fix SerializingLift.asCode for case objects #95

Closed DmytroMitin closed 1 year ago

DmytroMitin commented 1 year ago

If value is a case object, it's not enough to strip the dollar suffix, it's necessary to add .type to have an object type.

Discovered in https://stackoverflow.com/questions/62458950/how-to-use-quasiquotes-with-previously-defined-object

tribbloid commented 1 year ago

Thanks a lot Professor, this was my oversight.

nicolasstucki have proposed to yield staged quote instead of code. I just didn't have time to implement it yet. Even if I do, the best place for it would be scalameta, not here