scala - obtaining the source of a case class's automatically generated methods -
how can 1 obtain code of automatically generated methods of case class, cleanly preserve of them when refactoring regular (non-case) class? there compilation flag reveals case class's auto-generated methods, or other way, reduce cut & paste?
i have been under impression there compilation flags reveal automatically expanded definitions....
you can see compiler desugars source code -xprint:<phase>
flags. example (seeing code generated case classes), run:
scalac -xprint:typer yourscala.sca
with -xshow-phases
flag you'll see available phases.
but output see not compilable scala source code, intermediate representation.
Comments
Post a Comment