Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Macros fail to find annotations upon modification of the classes interface. #7424
When using a macro to find annotations the macro is unable to find the annotations on modification of the parent classes interface. The macro is run, but the annotations list of the symbol of interest is empty. However, once the file which executes these macros is recompiled, the annotations are again found.
The workaround is elaborate, though effective. Put the following lines before println:
m.typeSignature // force loading method's signature m.annotations.foreach(_.tpe) // force loading all the annotations