File tree 1 file changed +6
-9
lines changed
compiler/src/dotty/tools/dotc/core/classfile
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -628,19 +628,11 @@ class ClassfileParser(
628
628
}
629
629
630
630
class AttributeCompleter (sym : Symbol ) {
631
- var codeAttribute : Boolean = false
632
631
var sig : String = null
633
632
var constant : Constant = null
634
633
var exceptions : List [NameOrString ] = Nil
635
634
var annotations : List [Annotation ] = Nil
636
635
def complete (tp : Type , isVarargs : Boolean = false )(using Context ): Type = {
637
- // flag test will trigger completion and cycles, thus have to be lazy
638
- if (codeAttribute && sym.owner.isAllOf(Flags .JavaInterface )) {
639
- sym.resetFlag(Flags .Deferred )
640
- sym.owner.resetFlag(Flags .PureInterface )
641
- report.log(s " $sym in ${sym.owner} is a java 8+ default method. " )
642
- }
643
-
644
636
val updatedType =
645
637
if sig == null then tp
646
638
else {
@@ -715,7 +707,12 @@ class ClassfileParser(
715
707
716
708
case tpnme.CodeATTR =>
717
709
in.skip(attrLen)
718
- res.codeAttribute = true
710
+ // flag test will trigger completion and cycles, thus have to be lazy
711
+ if (sym.owner.flagsUNSAFE.isAllOf(Flags .JavaInterface )) {
712
+ sym.resetFlag(Flags .Deferred )
713
+ sym.owner.resetFlag(Flags .PureInterface )
714
+ report.log(s " $sym in ${sym.owner} is a java 8+ default method. " )
715
+ }
719
716
720
717
case _ =>
721
718
}
You can’t perform that action at this time.
0 commit comments