Skip to content

Commit f49bee1

Browse files
committed
Update calls to Annotation.deferred
1 parent 89ad21b commit f49bee1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -972,9 +972,8 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
972972
val start = readIndex
973973
val atp = readTypeRef()
974974
val phase = ctx.phase
975-
Annotation.deferred(
976-
atp.typeSymbol, implicit ctx =>
977-
atReadPos(start, () => readAnnotationContents(end)(ctx.withPhase(phase))))
975+
Annotation.deferred(atp.typeSymbol)(
976+
atReadPos(start, () => readAnnotationContents(end)(the[Context].withPhase(phase))))
978977
}
979978

980979
/* Read an abstract syntax tree */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ class Namer { typer: Typer =>
795795
if (cls eq sym)
796796
ctx.error("An annotation class cannot be annotated with iself", annotTree.sourcePos)
797797
else {
798-
val ann = Annotation.deferred(cls, implicit ctx => typedAnnotation(annotTree))
798+
val ann = Annotation.deferred(cls)(typedAnnotation(annotTree))
799799
sym.addAnnotation(ann)
800800
if (cls == defn.ForceInlineAnnot && sym.is(Method, butNot = Accessor))
801801
sym.setFlag(Inline)

0 commit comments

Comments
 (0)