Skip to content

Commit 70ecc1e

Browse files
committed
Added and corrected existing comments.
1 parent 764dc81 commit 70ecc1e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/compiler/scala/tools/nsc/symtab/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ trait Types extends reflect.generic.Types { self: SymbolTable =>
115115
}
116116

117117
private[Types] def record(tv: TypeVar) = {log = (tv, tv.constr.cloneInternal) :: log}
118-
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
118+
private[nsc] def clear() { log = List() }
119119

120120
// `block` should not affect constraints on typevars
121121
def undo[T](block: => T): T = {

src/compiler/scala/tools/nsc/typechecker/Typers.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ trait Typers { self: Analyzer =>
4646
resetImplicits()
4747
transformed.clear
4848
superDefs.clear
49+
// the log accumulates entries over time, even though it should not (Adriaan, Martin said so).
50+
// Lacking a better fix, we clear it here (before the phase is created, meaning for each
51+
// compiler run). This is good enough for the resident compiler, which was the most affected.
4952
undoLog.clear
5053
}
5154

0 commit comments

Comments
 (0)