diff options
author | Martin Odersky <odersky@gmail.com> | 2013-10-23 12:30:42 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-10-23 12:30:42 +0200 |
commit | 70958808202aa27034961aeb3352bd8af2e45312 (patch) | |
tree | 22375caeba5a79d46a4fb29402e2da23e06db905 /src/dotty/tools/dotc/printing | |
parent | 863e27b940215b2d0f9a9bf8b09b4f5f4b83409e (diff) | |
download | dotty-70958808202aa27034961aeb3352bd8af2e45312.tar.gz dotty-70958808202aa27034961aeb3352bd8af2e45312.tar.bz2 dotty-70958808202aa27034961aeb3352bd8af2e45312.zip |
Avoiding duplication for printing modules.
Normal singleton types are printed "underlying(value)". For modules that would give a duplication, which is avoided by this commit.
Diffstat (limited to 'src/dotty/tools/dotc/printing')
-rw-r--r-- | src/dotty/tools/dotc/printing/PlainPrinter.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index 680549489..f8c533b86 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -96,6 +96,8 @@ class PlainPrinter(_ctx: Context) extends Printer { toTextRef(tp) ~ ".type" case tp: TermRef if tp.denot.isOverloaded => "<overloaded " ~ toTextRef(tp) ~ ">" + case tp: TermRef if tp.symbol is Module => + toText(tp.underlying) case tp: SingletonType => toText(tp.underlying) ~ "(" ~ toTextRef(tp) ~ ")" case tp @ TypeRef(pre, name) => |