diff options
author | Martin Odersky <odersky@gmail.com> | 2005-09-23 12:28:07 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2005-09-23 12:28:07 +0000 |
commit | fcc3a4867d2df32377b56c908c46617a92745ce8 (patch) | |
tree | 534c4deb305f19ca3c3a76b3472b87c7dadb868d /sources/scala/tools/nsc/typechecker/Contexts.scala | |
parent | 14c330159a76b428b4ca5aa25c112d61836bd79a (diff) | |
download | scala-fcc3a4867d2df32377b56c908c46617a92745ce8.tar.gz scala-fcc3a4867d2df32377b56c908c46617a92745ce8.tar.bz2 scala-fcc3a4867d2df32377b56c908c46617a92745ce8.zip |
*** empty log message ***
Diffstat (limited to 'sources/scala/tools/nsc/typechecker/Contexts.scala')
-rwxr-xr-x | sources/scala/tools/nsc/typechecker/Contexts.scala | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sources/scala/tools/nsc/typechecker/Contexts.scala b/sources/scala/tools/nsc/typechecker/Contexts.scala index 807283bffc..ed6450b067 100755 --- a/sources/scala/tools/nsc/typechecker/Contexts.scala +++ b/sources/scala/tools/nsc/typechecker/Contexts.scala @@ -39,6 +39,17 @@ abstract class Contexts: Analyzer { sc } + def resetContexts: unit = { + var sc = startContext; + while (sc != NoContext) { + sc.tree match { + case Import(qual, _) => qual.tpe = singleType(qual.symbol.owner.thisType, qual.symbol) + case _ => + } + sc = sc.outer + } + } + class Context { var unit: CompilationUnit = _; var tree: Tree = _; // Tree associated with this context @@ -205,7 +216,7 @@ abstract class Contexts: Analyzer { if (implicitsCache == null) { val newImplicits: List[ImplicitInfo] = if (owner != outer.owner && owner.isClass && !owner.isPackageClass) { - if (!owner.hasFlag(INITIALIZED)) return outer.implicitss; + if (!owner.isInitialized) return outer.implicitss; if (settings.debug.value) log("collect member implicits " + owner + ", implicit members = " + owner.thisType.implicitMembers);//debug collectImplicits(owner.thisType.implicitMembers, owner.thisType) } else if (scope != outer.scope && !owner.isPackageClass) { |