Skip to content

Commit 5e47371

Browse files
committed
Tweak context in addAnnotations
1 parent 0c35b8f commit 5e47371

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/typer/Namer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,10 @@ class Namer { typer: Typer =>
748748

749749
protected def addAnnotations(sym: Symbol): Unit = original match {
750750
case original: untpd.MemberDef =>
751-
lazy val annotCtx = annotContext(original, sym)
751+
def annotCtx(implicit ctx: Context) = annotContext(original, sym)
752752
for (annotTree <- untpd.modsDeco(original).mods.annotations) {
753753
val cls = typedAheadAnnotationClass(annotTree)(annotCtx)
754-
val ann = Annotation.deferred(cls, implicit ctx => typedAnnotation(annotTree))
754+
val ann = Annotation.deferred(cls, implicit ctx => typedAnnotation(annotTree)(annotCtx))
755755
sym.addAnnotation(ann)
756756
if (cls == defn.ForceInlineAnnot && sym.is(Method, butNot = Accessor))
757757
sym.setFlag(Inline)

0 commit comments

Comments
 (0)