Closed
Description
The annotations of a DefDef
are added to its SymDenotation
at the beginning of typedDefDef
by addTypedModifiersAnnotations(ddef, sym)
.
The code of SymDenotation.annotations
is ensureCompleted(); myAnnotations
.
However, the completer for a DefDef does not trigger a call to typedDefDef
. The completer types only the tpt
and the rhs
of the DefDef
, but not the DefDef
itself. Therefore, ensureCompleted()
does not actually complete the annotations.
SymDenotation.annotations
therefore returns either no annotations or the correct annotations, dependent only on whether a call to typedDefDef
happens to have already been triggered by something else.