Skip to content

Commit e07716e

Browse files
committed
Add default methods generation.
1 parent 96274f9 commit e07716e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
413413
def isSetter: Boolean = toDenot(sym).isSetter
414414
def isGetClass: Boolean = sym eq defn.Any_getClass
415415
def isJavaDefined: Boolean = sym is Flags.JavaDefined
416+
def isJavaDefaultMethod: Boolean = !((sym is Flags.Deferred) || toDenot(sym).isClassConstructor)
416417
def isDeferred: Boolean = sym is Flags.Deferred
417418
def isPrivate: Boolean = sym is Flags.Private
418419
def getsJavaFinalFlag: Boolean =
@@ -431,7 +432,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
431432
def isVarargsMethod: Boolean = sym is Flags.JavaVarargs
432433
def isDeprecated: Boolean = false
433434
def isMutable: Boolean = sym is Flags.Mutable
434-
def hasAbstractFlag: Boolean = sym is Flags.Abstract
435+
def hasAbstractFlag: Boolean = (sym is Flags.Abstract) || (sym is Flags.JavaInterface)
435436
def hasModuleFlag: Boolean = sym is Flags.Module
436437
def isSynchronized: Boolean = sym is Flags.Synchronized
437438
def isNonBottomSubClass(other: Symbol): Boolean = sym.derivesFrom(other)

0 commit comments

Comments
 (0)