aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-04-09 11:54:39 +0200
committerMartin Odersky <odersky@gmail.com>2013-04-09 11:54:39 +0200
commit6fe7bdc091cee3f20f579409ba08800c5a1158d8 (patch)
tree054943f2f17b13cefe2df3142de6d2f477938d90 /src/dotty/tools/dotc/core
parent3ca11fbd1f86e128bc58e0e59d3c98da0a9829e8 (diff)
downloaddotty-6fe7bdc091cee3f20f579409ba08800c5a1158d8.tar.gz
dotty-6fe7bdc091cee3f20f579409ba08800c5a1158d8.tar.bz2
dotty-6fe7bdc091cee3f20f579409ba08800c5a1158d8.zip
Cosmetic fix/clarification in Printers.
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r--src/dotty/tools/dotc/core/Printers.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/Printers.scala b/src/dotty/tools/dotc/core/Printers.scala
index a1f342f56..fe69c65e6 100644
--- a/src/dotty/tools/dotc/core/Printers.scala
+++ b/src/dotty/tools/dotc/core/Printers.scala
@@ -277,7 +277,7 @@ object Printers {
else
(if (lo == defn.NothingType) Text() else " >: " ~ lo.toText) ~
(if (hi == defn.AnyType) Text() else " <: " ~ hi.toText)
- case ClassInfo(pre, cdenot, cparents, decls, optSelfType) =>
+ case ClassInfo(pre, cls, cparents, decls, optSelfType) =>
val preText = toTextLocal(pre)
val (tparams, otherDecls) = decls.toList partition treatAsTypeParam
val tparamsText =
@@ -287,7 +287,7 @@ object Printers {
"this: " ~ toText(optSelfType, LeftArrowPrec) ~ " =>"
else Text()
val parentsText = Text(cparents.map(p =>
- toText(reconstituteParent(cdenot, p), WithPrec)), " with ")
+ toText(reconstituteParent(cls, p), WithPrec)), " with ")
val trueDecls = otherDecls.filterNot(treatAsTypeArg)
val declsText = if (trueDecls.isEmpty) Text() else dclsText(trueDecls)
tparamsText ~ " extends " ~ parentsText ~ "{" ~ selfText ~ declsText ~
@@ -299,7 +299,7 @@ object Printers {
protected def treatAsTypeParam(sym: Symbol): Boolean = false
protected def treatAsTypeArg(sym: Symbol): Boolean = false
- protected def reconstituteParent(cdenot: ClassDenotation, parent: Type): Type = parent
+ protected def reconstituteParent(cls: ClassSymbol, parent: Type): Type = parent
/** String representation of symbol's kind. */
def kindString(sym: Symbol): String = {
@@ -501,9 +501,9 @@ object Printers {
sym.isType && (sym is ProtectedLocal) &&
(ctx.traceIndented(s"$sym.allOverriddenSymbols")(sym.allOverriddenSymbols) exists (_ is TypeParam))
- override protected def reconstituteParent(cdenot: ClassDenotation, parent: Type): Type =
+ override protected def reconstituteParent(cls: ClassSymbol, parent: Type): Type =
(parent /: parent.classSymbol.typeParams) { (parent, tparam) =>
- val targSym = cdenot.decls.lookup(tparam.name)
+ val targSym = cls.decls.lookup(tparam.name)
if (targSym.exists) RefinedType(parent, targSym.name, targSym.info)
else parent
}