diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-06 14:14:36 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-06 14:14:36 +0100 |
commit | ad37a192feb2eb0e2ab7415b9ec744310534f39d (patch) | |
tree | 2c68208577db0690d37253d164a245e3b60a6d4a /src/dotty/tools/dotc/printing/PlainPrinter.scala | |
parent | 3e313ac00f51d7d733955d613c554a8807fa7ec2 (diff) | |
download | dotty-ad37a192feb2eb0e2ab7415b9ec744310534f39d.tar.gz dotty-ad37a192feb2eb0e2ab7415b9ec744310534f39d.tar.bz2 dotty-ad37a192feb2eb0e2ab7415b9ec744310534f39d.zip |
Refined printing of module names.
Previously printing a simple name always suppressed a module class suffix, which led to sometimes confusing output. Now we are more selective where the suffix is suppressed.
Diffstat (limited to 'src/dotty/tools/dotc/printing/PlainPrinter.scala')
-rw-r--r-- | src/dotty/tools/dotc/printing/PlainPrinter.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index 5a01964d6..11a984ad3 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -170,7 +170,9 @@ class PlainPrinter(_ctx: Context) extends Printer { if (sym.isRoot || sym == NoSymbol || sym.owner.isEffectiveRoot) nameString(sym) else - fullNameString(sym.effectiveOwner.enclosingClass) + "." + nameString(sym) + fullNameString(fullNameOwner(sym)) + "." + nameString(sym) + + protected def fullNameOwner(sym: Symbol): Symbol = sym.effectiveOwner.enclosingClass protected def objectPrefix = "object " protected def packagePrefix = "package " |