Skip to content

Commit 52a9b6a

Browse files
authored
Merge pull request lampepfl#35 from dotty-staging/sharing-backend
Add isExpanded method
2 parents 73ea6de + 5db0a5c commit 52a9b6a

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
394394
debuglog(s"Potentially conflicting names for forwarders: $conflictingNames")
395395

396396
for (m <- moduleClass.info.membersBasedOnFlags(ExcludedForwarderFlags, Flag_METHOD)) {
397-
if (m.isType || m.isDeferred || (m.owner eq ObjectClass) || m.isConstructor)
397+
if (m.isType || m.isDeferred || (m.owner eq ObjectClass) || m.isConstructor || m.isExpanded)
398398
debuglog(s"No forwarder for '$m' from $jclassName to '$moduleClass'")
399399
else if (conflictingNames(m.name))
400400
log(s"No forwarder for $m due to conflict with ${linkedClass.info.member(m.name)}")

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ abstract class BackendInterface extends BackendInterfaceDefinitions {
445445
def isType: Boolean
446446
def isAnonymousClass: Boolean
447447
def isConstructor: Boolean
448+
def isExpanded: Boolean
448449
def isAnonymousFunction: Boolean
449450
def isMethod: Boolean
450451
def isPublic: Boolean

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ class ScalacBackendInterface[G <: Global](val global: G) extends BackendInterfac
466466
def isType: Boolean = sym.isType
467467
def isAnonymousClass: Boolean = sym.isAnonymousClass
468468
def isConstructor: Boolean = sym.isConstructor
469+
def isExpanded: Boolean = sym.hasFlag(Flags.EXPANDEDNAME)
469470
def isAnonymousFunction: Boolean = sym.isAnonymousFunction
470471
def isMethod: Boolean = sym.isMethod
471472
def isPublic: Boolean = sym.isPublic

0 commit comments

Comments
 (0)