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

No support for value classes (?) #391

@jvican

Description

@jvican

Hi everyone,

I'm getting an error that reveals that you probably don't have (proper?) support for value classes. It's understandable since you may be executing the macros after the desugaring happens and the value classes are removed. I'd like to know if there's interest in supporting this for the future. In case that you effectively have only access to the desugared code, I guess that the good approach would be to allow the user to explicit a value class with an annotation.

Concretely, this is the error I'm getting:

[info] io.netty.handler.codec.DecoderException: java.lang.IllegalArgumentException: Can not set final int field fp.model.Populate.id to fp.model.MsgId

where MsgId is a value class wrapping an Int:

case class MsgId(a: Int) extends AnyVal

The problem arises because the deserializer returns an Int when it should return a MsgId.

@heathermiller and @phaller may be interested in this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions