diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala | 7 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala index c406f8cca9..c855abd7fb 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala @@ -41,9 +41,16 @@ trait SyntheticMethods extends ast.TreeDSL { * associated badness: see ticket #883. So if it sees such a thing this has happened * (by virtue of the symbol being in createdMethodSymbols) it re-overrides it with * reference equality. + * + * TODO: remove once (deprecated) case class inheritance is dropped form nsc. */ private val createdMethodSymbols = new mutable.HashSet[Symbol] + /** Clear the cache of createdMethodSymbols. */ + def resetSynthetics() { + createdMethodSymbols.clear() + } + /** Add the synthetic methods to case classes. Note that a lot of the * complexity herein is a consequence of case classes inheriting from * case classes, which has been deprecated as of Sep 11 2009. So when diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index b211c20f41..ce0673196a 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -45,10 +45,12 @@ trait Typers extends Modes { final val shortenImports = false def resetTyper() { + //println("resetTyper called") resetContexts() resetNamer() resetImplicits() transformed.clear() + resetSynthetics() } object UnTyper extends Traverser { |