diff options
author | Martin Odersky <odersky@gmail.com> | 2006-06-29 10:41:15 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-06-29 10:41:15 +0000 |
commit | df6069ed290dd512c6d2613b27f56618140e468c (patch) | |
tree | df2368b9039cc6f75c9bfba5fb39a91018c9af0b /src/compiler | |
parent | d16491f730811aa5c3f0d00c2d80c7b312e1fb2f (diff) | |
download | scala-df6069ed290dd512c6d2613b27f56618140e468c.tar.gz scala-df6069ed290dd512c6d2613b27f56618140e468c.tar.bz2 scala-df6069ed290dd512c6d2613b27f56618140e468c.zip |
Disabled search implicits and tryTypedApply whe...
Disabled search implicits and tryTypedApply when after typer phase
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 5 |
1 files 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) |