From 2dcae86ae6937ad2f8cd8b05734eb9feb964404e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 5 Apr 2013 12:13:59 +0200 Subject: Added some tracing to asSeenFrom. --- src/dotty/tools/dotc/core/TypeOps.scala | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/dotty/tools/dotc/core/TypeOps.scala') diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala index 331431fac..42dd34f18 100644 --- a/src/dotty/tools/dotc/core/TypeOps.scala +++ b/src/dotty/tools/dotc/core/TypeOps.scala @@ -8,7 +8,7 @@ trait TypeOps { this: Context => final def asSeenFrom(tp: Type, pre: Type, cls: Symbol, theMap: AsSeenFromMap): Type = { - def toPrefix(pre: Type, cls: Symbol, thiscls: ClassSymbol): Type = + def toPrefix(pre: Type, cls: Symbol, thiscls: ClassSymbol): Type = ctx.debugTraceIndented(s"toPrefix($pre, $cls, $thiscls)") { if ((pre eq NoType) || (pre eq NoPrefix) || (cls is PackageClass)) tp else if (thiscls.isNonBottomSubClass(cls) && pre.baseType(thiscls).exists) @@ -18,8 +18,9 @@ trait TypeOps { this: Context => } else toPrefix(pre.baseType(cls).normalizedPrefix, cls.owner, thiscls) + } - /* ctx.debugTraceIndented(s"$tp.asSeenFrom($pre, $cls)") */ { // !!! DEBUG + ctx.debugTraceIndented(s"$tp.asSeenFrom($pre, $cls)") { // !!! DEBUG tp match { case tp: NamedType => val sym = tp.symbol @@ -39,8 +40,8 @@ trait TypeOps { this: Context => asSeenFrom(tp.parent, pre, cls, theMap), tp.refinedName, asSeenFrom(tp.refinedInfo, pre, cls, theMap)) - case tp: ClassInfo => - tp.derivedClassInfo(asSeenFrom(tp.prefix, pre, cls, theMap)) + // case tp: ClassInfo => !!! disabled for now + // tp.derivedClassInfo(asSeenFrom(tp.prefix, pre, cls, theMap)) case _ => (if (theMap != null) theMap else new AsSeenFromMap(pre, cls)) .mapOver(tp) -- cgit v1.2.3