Skip to content

Commit a1f7c7d

Browse files
committed
Add deprecate annotation lazily
1 parent f8bacbe commit a1f7c7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ class ClassfileParser(
682682
case tpnme.DeprecatedATTR =>
683683
val msg = Literal(Constant("see corresponding Javadoc for more information."))
684684
val since = Literal(Constant(""))
685-
sym.addAnnotation(Annotation(defn.DeprecatedAnnot, msg, since))
685+
delayedWork ::= sym.addAnnotation(Annotation(defn.DeprecatedAnnot, msg, since))
686686

687687
case tpnme.ConstantValueATTR =>
688688
val c = pool.getConstant(in.nextChar)
@@ -709,7 +709,7 @@ class ClassfileParser(
709709
case tpnme.CodeATTR =>
710710
in.skip(attrLen)
711711
// flag test will trigger completion and cycles, thus have to be lazy
712-
delayedWork ::= { (using ctx) =>
712+
delayedWork ::= {
713713
if (sym.owner.isAllOf(Flags.JavaInterface)) {
714714
sym.resetFlag(Flags.Deferred)
715715
sym.owner.resetFlag(Flags.PureInterface)

0 commit comments

Comments
 (0)