diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 680f973f19..69bfc75119 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -188,9 +188,12 @@ abstract class GenJVM extends SubComponent { addStaticInit(jclass) if (isTopLevelModule(c.symbol)) { - if (c.symbol.linkedClassOfModule == NoSymbol) - dumpMirrorClass(c.symbol, c.cunit.source.toString); - else + if (c.symbol.linkedClassOfModule == NoSymbol) { + if (c.symbol.owner.info.member(c.symbol.name.toTypeName) != NoSymbol) + println("Class with same name as " + c.symbol + " is defined in a different compilation unit") + else + dumpMirrorClass(c.symbol, c.cunit.source.toString); + } else log("No mirror class for module with linked class: " + c.symbol.fullNameString) } |