scala / pickling

Fast, customizable, boilerplate-free pickling support for Scala
lampwww.epfl.ch/~hmiller/pickling
BSD 3-Clause "New" or "Revised" License
831 stars 79 forks source link

Add picklers and unpickler for Nothing #432

Closed jvican closed 8 years ago

jvican commented 8 years ago

Sometimes, it is mandatory to have picklers and unpicklers for Nothing. A compelling use case would be:

val s = spore { (x: Int) => i.toString }
s.pickle // picks the default type Spore[Int, String] {type Captured = Nothing}

Currently, the above snippet fails because the picklers are missing. I can see how other use cases would benefit from this addition while not being detrimental at all. The expected behaviour of the picklers is to do, logically, nothing.

jvican commented 8 years ago

Addressed by https://github.com/scala/pickling/pull/433.