aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/printing/RefinedPrinter.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-08-13 11:21:37 +0200
committerMartin Odersky <odersky@gmail.com>2014-08-13 11:22:49 +0200
commitdeaa0d8bdcd5592e124acfbca1a1414365b667d7 (patch)
treea6b2bd63b05db7cae6c4b588cf406b9076a1bcb3 /src/dotty/tools/dotc/printing/RefinedPrinter.scala
parentab8ee535fc2f16f3ece55326e58dec6171614829 (diff)
downloaddotty-deaa0d8bdcd5592e124acfbca1a1414365b667d7.tar.gz
dotty-deaa0d8bdcd5592e124acfbca1a1414365b667d7.tar.bz2
dotty-deaa0d8bdcd5592e124acfbca1a1414365b667d7.zip
Package denotations are never transformed
Packages should always have a single denotation, which is invariant for all transformations. Package members should always be entered in the first phase, and should never be entered after a given phase. This reflects the fact that package members correspond to classfiles. Once you create a classfile, it stays around and is available from the start of the next run. Also, we need to prevent multiple denotation versions of packages from hanging on to stale symbols. It would not be enough to replace a package member by a newly compiled one; if packages had multiple denotations we'd have to do this for all of them.
Diffstat (limited to 'src/dotty/tools/dotc/printing/RefinedPrinter.scala')
-rw-r--r--src/dotty/tools/dotc/printing/RefinedPrinter.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
index d54546796..ab248a4fc 100644
--- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala
+++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
@@ -109,7 +109,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
return (toTextLocal(tycon) ~ "[" ~ Text(args map argText, ", ") ~ "]").close
}
case tp: TypeRef =>
- if ((tp.symbol is TypeParam | TypeArgument | ExpandedName) && !ctx.phase.erasedTypes && !tp.symbol.isCompleting) {
+ val hideType = tp.symbol is TypeParam | TypeArgument | ExpandedName
+ if (hideType && !ctx.phase.erasedTypes && !tp.symbol.isCompleting) {
tp.info match {
case TypeAlias(hi) => return toText(hi)
case _ => if (tp.prefix.isInstanceOf[ThisType]) return nameString(tp.symbol)