diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-31 18:01:20 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-31 18:05:55 +0200 |
commit | 8f321f2afd0cd363492665b410a70476c8a4b751 (patch) | |
tree | 3b1e17627c8f5a5f6e9ca152d6a3308100456904 /src/dotty/tools/dotc/printing/RefinedPrinter.scala | |
parent | 2bfff5e5457223114e24e112aa6715f6a9d0c3f3 (diff) | |
download | dotty-8f321f2afd0cd363492665b410a70476c8a4b751.tar.gz dotty-8f321f2afd0cd363492665b410a70476c8a4b751.tar.bz2 dotty-8f321f2afd0cd363492665b410a70476c8a4b751.zip |
Types of This trees are promoted during retyping.
Failing to do this leads to problems when retyping the This of
nested classes with the same name (e.g. nested anonymous classes as they appear in
t0453.scala).
RefinedPrinter was changed to avoid sugaring of anonymous classes when uniqid is
set (that was essential to track down the problem).
Diffstat (limited to 'src/dotty/tools/dotc/printing/RefinedPrinter.scala')
-rw-r--r-- | src/dotty/tools/dotc/printing/RefinedPrinter.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala index 0da9b6d54..eba27dfef 100644 --- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala +++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala @@ -116,7 +116,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { case _ => if (tp.prefix.isInstanceOf[ThisType]) return nameString(tp.symbol) } } - else if (tp.symbol.isAnonymousClass) + else if (tp.symbol.isAnonymousClass && !ctx.settings.uniqid.value) return toText(tp.info) case ExprType(result) => return "=> " ~ toText(result) |