com-lihaoyi / upickle

uPickle: a simple, fast, dependency-free JSON & Binary (MessagePack) serialization library for Scala
https://com-lihaoyi.github.io/upickle
MIT License
715 stars 164 forks source link

Be more robust about checking whether objects are modules in Scala3 #447

Closed lihaoyi closed 1 year ago

lihaoyi commented 1 year ago

.isSingleton doesn't work reliable in the presence of derives, neither does valueOf[T]. This PR re-implements our own versions that work properly