1

Currently, I use a Scala macro annotation to automatically generate some code into a Scala object. It works like this:

@constants
object PopoverCommands extends Constants { … }

I find it somewhat redundant to have to extend Constants and to annotate PopoverCommands with @constants. I know the macro annotation can insert the extends Constants part. My question goes the other way round: is there any way I can run some macro code (e.g. simulate the presence of @constants) by simply extending a type (here, Constants)?

Jean-Philippe Pellet
  • 59,296
  • 21
  • 173
  • 234

1 Answers1

1

No, this isn't currently possible.

Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487