diff options
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 3 | ||||
-rw-r--r-- | tests/pos/t7426.scala (renamed from tests/pending/pos/t7426.scala) | 0 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index c9a2e4b48..f0086b0ab 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -1072,8 +1072,9 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit def completeAnnotations(mdef: untpd.MemberDef, sym: Symbol)(implicit ctx: Context): Unit = { // necessary to force annotation trees to be computed. sym.annotations.foreach(_.tree) + val annotCtx = ctx.outersIterator.dropWhile(_.owner == sym).next // necessary in order to mark the typed ahead annotations as definitely typed: - untpd.modsDeco(mdef).mods.annotations.foreach(typedAnnotation) + untpd.modsDeco(mdef).mods.annotations.foreach(typedAnnotation(_)(annotCtx)) } def typedAnnotation(annot: untpd.Tree)(implicit ctx: Context): Tree = track("typedAnnotation") { diff --git a/tests/pending/pos/t7426.scala b/tests/pos/t7426.scala index 8e42ad181..8e42ad181 100644 --- a/tests/pending/pos/t7426.scala +++ b/tests/pos/t7426.scala |