Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compositePickler.addConcreteType inside class does not compile #74

Open
fdietze opened this issue Mar 4, 2017 · 1 comment
Open

compositePickler.addConcreteType inside class does not compile #74

fdietze opened this issue Mar 4, 2017 · 1 comment

Comments

@fdietze
Copy link
Contributor

fdietze commented Mar 4, 2017

Hi, this compiles:

sealed trait F
case object A extends F
implicit def fp = compositePickler[F].addConcreteType[A.type]

while this does not:

class X {
  sealed trait F
  case object A extends F
  implicit def fp = compositePickler[F].addConcreteType[A.type]
}
error:
<macro>:1: error: value X is not a member of object $iw
 Note: implicit method fp is not applicable here because it comes after the application point and it lacks an explicit result type
X.A
                                  ^

Is this expected behavior or a bug?

@ochrons
Copy link
Collaborator

ochrons commented Nov 17, 2017

First of all you should never have a pickler defined with implicit def because that will regenerate the pickler every time it's used :)

Otherwise it's probably a duplicate of #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants