diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 7496107798..a91abac94a 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -834,9 +834,14 @@ abstract class GenJVM extends SubComponent { val mps = module.linkedClassOfModule.info.baseClasses cps.filter(mps contains) } - /* the setter doesn't show up in members so we inspect the name */ + /* The setter doesn't show up in members so we inspect the name + * ... and clearly it helps to know how the name is encoded, see ticket #3003. + * This logic is grossly inadequate! Name mangling needs a devotee. + */ def conflictsInCommonParent(name: Name) = - commonParents exists { cp => name startsWith (cp.name + "$") } + commonParents exists { cp => + (name startsWith (cp.name + "$")) || (name containsName ("$" + cp.name + "$")) + } /** Should method `m' get a forwarder in the mirror class? */ def shouldForward(m: Symbol): Boolean = |