aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-12-19 16:43:05 +0100
committerMartin Odersky <odersky@gmail.com>2014-12-19 16:43:05 +0100
commitcf6b62f11815fc98fe69e25875668c8709631656 (patch)
tree6a0efcff52ef0a94398b2f817f20946d92ebcdea /src/dotty/tools/dotc/core/SymDenotations.scala
parent848714377b68eedf0c66b59ff8c57cd0da10109c (diff)
downloaddotty-cf6b62f11815fc98fe69e25875668c8709631656.tar.gz
dotty-cf6b62f11815fc98fe69e25875668c8709631656.tar.bz2
dotty-cf6b62f11815fc98fe69e25875668c8709631656.zip
Avoid name clashes when generating synthetic companion objects.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index eccdcbfb9..613d4b29c 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -171,9 +171,14 @@ object SymDenotations {
myInfo = tp
}
- /** The name, except if this is a module class, strip the module class suffix */
+ /** The name, except
+ * - if this is a module class, strip the module class suffix
+ * - if this is a companion object with a clash-avoiding name, strip the
+ * "avoid clash" suffix
+ */
def effectiveName(implicit ctx: Context) =
- if (this is ModuleClass) name.stripModuleClassSuffix else name
+ if (this is ModuleClass) name.stripModuleClassSuffix
+ else name.stripAvoidClashSuffix
/** The privateWithin boundary, NoSymbol if no boundary is given.
*/