diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-04-21 20:33:14 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-04-21 20:33:14 +0200 |
commit | 4004c4969b55a2f51e428cde4da58041876da82c (patch) | |
tree | e28d5976b00ce4178df4e05934024030fdc477fa /src/compiler | |
parent | 9ecb5c6423e55bd728621f79daf0c7c927bf41df (diff) | |
parent | dc656062c35040f28c8b7774710d899b79f2e401 (diff) | |
download | scala-4004c4969b55a2f51e428cde4da58041876da82c.tar.gz scala-4004c4969b55a2f51e428cde4da58041876da82c.tar.bz2 scala-4004c4969b55a2f51e428cde4da58041876da82c.zip |
Merge pull request #3634 from retronym/ticket/7992
SI-7992 Fix super-accessor generation after a local class
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala index 87da565142..9b9e641cad 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala @@ -346,12 +346,14 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT * performance hit for the compiler as a whole. */ override def atOwner[A](tree: Tree, owner: Symbol)(trans: => A): A = { + val savedValid = validCurrentOwner if (owner.isClass) validCurrentOwner = true val savedLocalTyper = localTyper localTyper = localTyper.atOwner(tree, if (owner.isModule) owner.moduleClass else owner) typers = typers updated (owner, localTyper) val result = super.atOwner(tree, owner)(trans) localTyper = savedLocalTyper + validCurrentOwner = savedValid typers -= owner result } |