diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2011-02-01 16:18:20 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2011-02-01 16:18:20 +0000 |
commit | caf436d96fda91365295035297bbf8cec4bd4da1 (patch) | |
tree | 55bba64709329c3bc9650292dc331a11ba0477b4 /src | |
parent | 589b8a5d536da8c41bcaeee4aff382828fd9253d (diff) | |
download | scala-caf436d96fda91365295035297bbf8cec4bd4da1.tar.gz scala-caf436d96fda91365295035297bbf8cec4bd4da1.tar.bz2 scala-caf436d96fda91365295035297bbf8cec4bd4da1.zip |
Cleared 'createdSyntheticMethod' on resetTyper ...
Cleared 'createdSyntheticMethod' on resetTyper (another leak in the
presentation compiler). review by extempore.
Diffstat (limited to 'src')
-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 { |