@@ -75,6 +75,7 @@ object Annotations {
7575 }
7676
7777 case class LazyBodyAnnotation (private var bodyExpr : Context => Tree ) extends BodyAnnotation {
78+ // TODO: Make `bodyExpr` an IFT once #6865 os in bootstrap
7879 private [this ] var evaluated = false
7980 private [this ] var myBody : Tree = _
8081 def tree (implicit ctx : Context ): Tree = {
@@ -159,17 +160,17 @@ object Annotations {
159160 object Child {
160161
161162 /** A deferred annotation to the result of a given child computation */
162- def apply (delayedSym : Context => Symbol , span : Span )(implicit ctx : Context ): Annotation = {
163+ def later (delayedSym : given Context => Symbol , span : Span )(implicit ctx : Context ): Annotation = {
163164 def makeChildLater (implicit ctx : Context ) = {
164- val sym = delayedSym(ctx)
165- New (defn.ChildAnnotType .appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil )
165+ val sym = delayedSym
166+ New (defn.ChildAnnot .typeRef .appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil )
166167 .withSpan(span)
167168 }
168169 deferred(defn.ChildAnnot )(makeChildLater(ctx))
169170 }
170171
171172 /** A regular, non-deferred Child annotation */
172- def apply (sym : Symbol , span : Span )(implicit ctx : Context ): Annotation = apply( _ => sym, span)
173+ def apply (sym : Symbol , span : Span )(implicit ctx : Context ): Annotation = later( given _ => sym, span)
173174
174175 def unapply (ann : Annotation )(implicit ctx : Context ): Option [Symbol ] =
175176 if (ann.symbol == defn.ChildAnnot ) {
@@ -201,7 +202,7 @@ object Annotations {
201202
202203 def ThrowsAnnotation (cls : ClassSymbol )(implicit ctx : Context ): Annotation = {
203204 val tref = cls.typeRef
204- Annotation (defn.ThrowsAnnotType .appliedTo(tref), Ident (tref))
205+ Annotation (defn.ThrowsAnnot .typeRef .appliedTo(tref), Ident (tref))
205206 }
206207
207208 /** A decorator that provides queries for specific annotations
0 commit comments