diff options
author | Martin Odersky <odersky@gmail.com> | 2014-12-19 16:43:05 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-12-19 16:43:05 +0100 |
commit | cf6b62f11815fc98fe69e25875668c8709631656 (patch) | |
tree | 6a0efcff52ef0a94398b2f817f20946d92ebcdea /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | 848714377b68eedf0c66b59ff8c57cd0da10109c (diff) | |
download | dotty-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.scala | 9 |
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. */ |