heathermiller / scala-pickling

Fast, customizable, boilerplate-free pickling support for Scala. MOVED TO http://github.com/scala/pickling
18 stars 1 forks source link

unpickling without a type should provide helpful error messages #1

Closed heathermiller closed 11 years ago

heathermiller commented 11 years ago
scala> val p = 4.pickle
p: scala.pickling.binary.BinaryPickle = BinaryPickle([0,0,0,9,115,99,97,108,97,46,73,110,116,0,0,0,4])

scala> p.unpickle
<console>:15: error: diverging implicit expansion for type scala.pickling.Unpickler[Nothing]
starting with method traversablePickler in trait LowPriorityPicklersUnpicklers
              p.unpickle
                ^

This could be more helpful, and remind the user to provide a type to unpickle to.

xeno-by commented 11 years ago

https://github.com/heathermiller/scala-pickling/commit/169ec98c642ce4d7fdf7c39a22f16432d303947c