From df6069ed290dd512c6d2613b27f56618140e468c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 29 Jun 2006 10:41:15 +0000 Subject: Disabled search implicits and tryTypedApply whe... Disabled search implicits and tryTypedApply when after typer phase --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 14884ecb4f..7c37041ab2 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -58,7 +58,7 @@ trait Typers requires Analyzer { private def inferView(pos: int, from: Type, to: Type, reportAmbiguous: boolean): Tree = { if (settings.debug.value) log("infer view from "+from+" to "+to);//debug - if (phase.erasedTypes) EmptyTree + if (phase.id > currentRun.typerPhase.id) EmptyTree else from match { case MethodType(_, _) => EmptyTree case OverloadedType(_, _) => EmptyTree @@ -502,7 +502,7 @@ trait Typers requires Analyzer { def adaptToMember(qual: Tree, name: Name, tp: Type): Tree = { val qtpe = qual.tpe.widen; if (qual.isTerm && (qual.symbol == null || !qual.symbol.isTerm || qual.symbol.isValue) && - !phase.erasedTypes && !qtpe.isError && !tp.isError && + phase.id <= currentRun.typerPhase.id && !qtpe.isError && !tp.isError && qtpe.symbol != AllRefClass && qtpe.symbol != AllClass && qtpe != WildcardType) { val coercion = inferView(qual.pos, qtpe, name, tp, true) if (coercion != EmptyTree) @@ -1602,6 +1602,7 @@ trait Typers requires Analyzer { if (settings.debug.value) log("trans app "+fun1+":"+fun1.symbol+":"+fun1.tpe+" "+args);//DEBUG if (util.Statistics.enabled) appcnt = appcnt + 1 if (xviews && + phase.id <= currentRun.typerPhase.id && fun1.isInstanceOf[Select] && !fun1.tpe.isInstanceOf[ImplicitMethodType] && (mode & (EXPRmode | SNDTRYmode)) == EXPRmode) tryTypedApply(fun1, args) -- cgit v1.2.3