Skip to content

Commit

Permalink
SI-7345 Use combinator to find next enclosing non-template.
Browse files Browse the repository at this point in the history
  • Loading branch information
retronym committed Apr 21, 2013
1 parent 281b850 commit b1cb004
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/compiler/scala/tools/nsc/typechecker/Contexts.scala
Expand Up @@ -329,9 +329,7 @@ trait Contexts { self: Analyzer =>
* accessible.
*/
def makeConstructorContext = {
var baseContext = enclClass.outer
while (baseContext.tree.isInstanceOf[Template])
baseContext = baseContext.outer
val baseContext = enclClass.outer.nextEnclosing(!_.tree.isInstanceOf[Template])
val argContext = baseContext.makeNewScope(tree, owner)
argContext.restoreState(state)
argContext.inSelfSuperCall = true
Expand Down

0 comments on commit b1cb004

Please sign in to comment.