Closed ohze closed 4 years ago
Maybe fix by:
val annotSym = Option(annot.tpe).fold(NoSymbol)(_.typeSymbol)
Ah. This issue can be reproduced with:
@accessible
object AccessibleMacroExample {
(0: @scala.unchecked) match { case _ => }
}
class accessible extends scala.annotation.StaticAnnotation {
def macroTransform(annottees: Any*): Any = macro AccessibleMacro.apply
}
import scala.reflect.macros.whitebox
class AccessibleMacro(val c: whitebox.Context) {
def apply(annottees: c.Tree*): c.Tree = annottees.head
}
git clone https://github.com/giabao/silencer-bug.git
sbt compile
1.7.1 is on the way.
When compile zio on scala 2.13.3 using silencer 1.7.0:
Inspect
Error when compiling
zio.examples.macros.AccessibleMacroExample
:Note,
AccessibleMacroExample.foo
is auto generated by: