On May 13, 1:42 pm, Eugene Burmako <
eugene.burm...@epfl.ch> wrote:
> Currently the situation with flags in the reflection API is quite dire. You
> need to use `scala.reflect.internal.Flags.CASEACCESSOR` and `PARAMACCESSOR`
> and then cast them to FlagSet. Maybe we'll be able to improve on that in
> 2.11.0.
>
> On 13 May 2013 19:34, Rob Nikander <
rob.nikan...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > It seems like the reflection function showRaw is reporting a modifier
> > that doesn't exist. I'm trying to write a macro that generates a case
> > class definition, among other things. To see what the AST should look
> > like, I open a scala prompt and run:
>
> > scala> import scala.reflect.runtime.universe._
> > scala> reify( { case class Foo(name: String, id: Long, count:
> > Int) } )
> > res2: ...
> > scala> showRaw(res2)
> > res3: String = Expr(Block(List(ClassDef(Modifiers(CASE),
> > newTypeName("Foo"), List(),
> > Template(List(Ident(scala.Product),
> > Ident(scala.Serializable)), emptyValDef,
> > List(ValDef(Modifiers(CASEACCESSOR | PARAMACCESSOR),
> > newTermName("name"), ...
>
> > But there is nothing called CASEACCESSOR or PARAMACCESSOR in:
>