summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-01-31 05:39:25 +0000
committerPaul Phillips <paulp@improving.org>2010-01-31 05:39:25 +0000
commit0bc49d7c61e4e7774ecdb69204066218d0234cfa (patch)
tree661569cf9924fa5f57b623708da7caa776ef0857
parent3078e1709307dc07fec5265e7a1afc108bacda00 (diff)
downloadscala-0bc49d7c61e4e7774ecdb69204066218d0234cfa.tar.gz
scala-0bc49d7c61e4e7774ecdb69204066218d0234cfa.tar.bz2
scala-0bc49d7c61e4e7774ecdb69204066218d0234cfa.zip
Band-aid for #3004.
name mangling and forwarders, in which case review away.
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala9
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 =