Skip to content
This repository was archived by the owner on Feb 20, 2019. It is now read-only.

Pickling List[Product with Serializable with MyTrait] #115

@mateuszdraco

Description

@mateuszdraco

There is some problem with Set that what I understand is wrong. Let's define:

import scala.pickling._
import json._

trait MyTrait
case object valA extends MyTrait
case object valB extends MyTrait

Now, if try to pickle some collections:

List[MyTrait]().pickle // works
List(valA).pickle // works
List(valA, valB).pickle // doesn't work
List[MyTrait](valA, valB).pickle // works

The third List does not work, however it's not real issue, we just have to specify the type of an elements and we are good to go.

And now, the main problem is that I cannot pickle any filled set of values:

Set[MyTrait]().pickle // works
Set[MyTrait](valA).pickle

scala.NotImplementedError: an implementation is missing

And I have no idea what I should do to make it works :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions