NamedArgument is a specific type of tree(not an annotation), instances of which are eliminated by PostTyperTransforms.

hasAnnotation works even after this, eg in TailRec phase.

I don't know what scalac does in this case, so I'm not sure what concerns you. Can you please elaborate?


08.04.2014, 16:46, "Jason Zaugg" <notifications@github.com>:
> In src/dotty/tools/dotc/ast/Trees.scala:
>
>> @@ -177,6 +177,10 @@ object Trees { > def hasAnnotations = annotations.nonEmpty > def hasPrivateWithin = privateWithin != tpnme.EMPTY > > + > + def hasAnnotation(sym: ClassSymbol)(implicit ctx: Context) = > + annotations.exists (_.symbol.owner eq sym)
>> Which method?
>
> hasAnnotation
>
> Is a NamedArgument in an annotation tree touched by PostTyperTransformer? Or does it know not to bother with them?
>
> —
> Reply to this email directly or view it on GitHub.