Skip to content
This repository has been archived by the owner on Apr 19, 2020. It is now read-only.

Allow overriding of automatically generated members of @data classes #87

Open
florv opened this issue Nov 9, 2015 · 1 comment
Open
Labels
Milestone

Comments

@florv
Copy link

florv commented Nov 9, 2015

It would be nice if it was possible to override automatically generated members of @data classes.
It will then be possible to compile something like this bare example:

@data class A(a: Int, b: Int) {
  def toString(): String = {
    "foo"
  }

  def copy()(implicit a: Allocator): A = {
    A(a, b)
  }
}
@densh
Copy link
Owner

densh commented Nov 11, 2015

This makes sense, it shouldn't be hard to make macro annotations let user define their own implementations of some of the pre-generated methods.

@densh densh added the Feature label Nov 11, 2015
@densh densh self-assigned this Nov 11, 2015
@densh densh added this to the 0.2 milestone Nov 19, 2015
@densh densh removed their assignment Jun 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants