See https://issues.scala-lang.org/browse/SI-8926 for details.
Alternative would be to have this assumption only when currently compiling the particular java-defined annotation, ie detect if symbol is loaded from class path or not.
@hrhino almost fixed this one too for Scalac:
https://github.com/scala/bug/issues/8928
https://github.com/scala/scala/pull/5892
That's on my to-do list for when I can get back to OSS, too. Maybe annotations will be my second contribution to dotty.
Most helpful comment
That's on my to-do list for when I can get back to OSS, too. Maybe annotations will be my second contribution to dotty.