diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2010-11-16 10:05:09 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2010-11-16 10:05:09 +0000 |
commit | 70ecc1ea56dbde5f6124b6733973ffc56deae277 (patch) | |
tree | 5c342366bfcd873d731ed09cb458899efac326e9 /src | |
parent | 764dc81ede76e8013fbb755ce1f2f928f9551acc (diff) | |
download | scala-70ecc1ea56dbde5f6124b6733973ffc56deae277.tar.gz scala-70ecc1ea56dbde5f6124b6733973ffc56deae277.tar.bz2 scala-70ecc1ea56dbde5f6124b6733973ffc56deae277.zip |
Added and corrected existing comments.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Types.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index a897bb14a4..05f8489192 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -115,7 +115,7 @@ trait Types extends reflect.generic.Types { self: SymbolTable => } private[Types] def record(tv: TypeVar) = {log = (tv, tv.constr.cloneInternal) :: log} - private[nsc] def clear() { log = List() } // TODO: what's the point of this method? -- we roll back the log (using undoTo) in the combinators below anyway, see comments at clear() calls below + private[nsc] def clear() { log = List() } // `block` should not affect constraints on typevars def undo[T](block: => T): T = { diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 8a9f9916d0..1d685a88e7 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -46,6 +46,9 @@ trait Typers { self: Analyzer => resetImplicits() transformed.clear superDefs.clear + // the log accumulates entries over time, even though it should not (Adriaan, Martin said so). + // Lacking a better fix, we clear it here (before the phase is created, meaning for each + // compiler run). This is good enough for the resident compiler, which was the most affected. undoLog.clear } |