Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SI-7345 Refactor manual iteration to use foreach.

  • Loading branch information...
commit 78e7ebab7d8acce2632c7ba6a63546cc174e1467 1 parent 7ce4de4
@retronym retronym authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/compiler/scala/tools/nsc/typechecker/Contexts.scala
View
6 src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -99,13 +99,11 @@ trait Contexts { self: Analyzer =>
}
def resetContexts() {
- var sc = startContext
- while (sc != NoContext) {
- sc.tree match {
+ startContext.enclosingContextChain foreach { context =>
+ context.tree match {
case Import(qual, _) => qual setType singleType(qual.symbol.owner.thisType, qual.symbol)
case _ =>
}
- sc = sc.outer
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.