@@ -124,32 +124,32 @@ object Annotations {
124124 }
125125
126126 /** Create an annotation where the tree is computed lazily. */
127- def deferred (sym : Symbol , treeFn : Context => Tree )(implicit ctx : Context ): Annotation =
127+ def deferred (sym : Symbol )( treeFn : given Context => Tree )(implicit ctx : Context ): Annotation =
128128 new LazyAnnotation {
129129 override def symbol (implicit ctx : Context ): Symbol = sym
130- def complete (implicit ctx : Context ) = treeFn( ctx)
130+ def complete (implicit ctx : Context ) = treeFn given ctx
131131 }
132132
133133 /** Create an annotation where the symbol and the tree are computed lazily. */
134- def deferredSymAndTree (symf : Context => Symbol , treeFn : Context => Tree )(implicit ctx : Context ): Annotation =
134+ def deferredSymAndTree (symf : given Context => Symbol )( treeFn : given Context => Tree )(implicit ctx : Context ): Annotation =
135135 new LazyAnnotation {
136136 private [this ] var mySym : Symbol = _
137137
138138 override def symbol (implicit ctx : Context ): Symbol = {
139139 if (mySym == null || mySym.defRunId != ctx.runId) {
140- mySym = symf( ctx)
140+ mySym = symf given ctx
141141 assert(mySym != null )
142142 }
143143 mySym
144144 }
145- def complete (implicit ctx : Context ) = treeFn( ctx)
145+ def complete (implicit ctx : Context ) = treeFn given ctx
146146 }
147147
148148 def deferred (atp : Type , args : List [Tree ])(implicit ctx : Context ): Annotation =
149- deferred(atp.classSymbol, implicit ctx => New (atp, args))
149+ deferred(atp.classSymbol)( New (atp, args))
150150
151151 def deferredResolve (atp : Type , args : List [Tree ])(implicit ctx : Context ): Annotation =
152- deferred(atp.classSymbol, implicit ctx => resolveConstructor(atp, args))
152+ deferred(atp.classSymbol)( resolveConstructor(atp, args))
153153
154154 def makeAlias (sym : TermSymbol )(implicit ctx : Context ): Annotation =
155155 apply(defn.AliasAnnot , List (
@@ -165,7 +165,7 @@ object Annotations {
165165 New (defn.ChildAnnotType .appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil )
166166 .withSpan(span)
167167 }
168- deferred(defn.ChildAnnot , implicit ctx => makeChildLater(ctx))
168+ deferred(defn.ChildAnnot )( makeChildLater(ctx))
169169 }
170170
171171 /** A regular, non-deferred Child annotation */
0 commit comments