Skip to content

Commit 321e140

Browse files
committed
No longer cache file content
1 parent 9c0cd5c commit 321e140

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/main/scala/inox/Reporter.scala

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,10 @@ class DefaultReporter(debugSections: Set[DebugSection]) extends Reporter(debugSe
141141
printLineContent(msg.position)
142142
}
143143

144-
protected var linesOf = Map[java.io.File, List[String]]()
145-
146144
def getLine(pos: Position): Option[String] = {
147-
val lines = linesOf.get(pos.file) match {
148-
case Some(lines) =>
149-
lines
150-
case None =>
151-
val lines = if (pos == NoPosition) {
152-
Nil
153-
} else {
154-
scala.io.Source.fromFile(pos.file).getLines.toList
155-
}
156-
157-
linesOf += pos.file -> lines
158-
lines
159-
}
145+
val lines =
146+
if (pos == NoPosition) Nil
147+
else scala.io.Source.fromFile(pos.file).getLines.toList
160148

161149
if (lines.size >= pos.line && pos.line > 0) {
162150
Some(lines(pos.line - 1))

0 commit comments

Comments
 (0)