Skip to content

Commit 70d63bf

Browse files
committed
Simplify decision about whether to emit ACC_ABSTRACT
Look at the RHS of the DefDef, rather than at flags of the Symbol
1 parent 3a72a2d commit 70d63bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/scala/tools/nsc/backend/jvm/BCodeSkelBuilder.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ abstract class BCodeSkelBuilder extends BCodeHelpers {
568568
}
569569

570570
val isNative = methSymbol.hasAnnotation(definitions.NativeAttr)
571-
val isAbstractMethod = (methSymbol.isDeferred || methSymbol.owner.isInterface) && !methSymbol.hasFlag(Flags.JAVA_DEFAULTMETHOD)
571+
val isAbstractMethod = rhs == EmptyTree
572572
val flags = GenBCode.mkFlags(
573573
javaFlags(methSymbol),
574574
if (isAbstractMethod) asm.Opcodes.ACC_ABSTRACT else 0,

0 commit comments

Comments
 (0)