Skip to content

Commit 170b36d

Browse files
committed
Add documentation for new field.
1 parent 1b5a2ff commit 170b36d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

compiler/src/dotty/tools/dotc/transform/init/Cache.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ class Cache[Config, Res]:
7575
*/
7676
protected var changed: Boolean = false
7777

78+
/** Whether any value in the cache was accessed after being added.
79+
* If no cached values are used after they are added for the first time
80+
* then another iteration of analysis is not needed.
81+
*/
7882
protected var cacheUsed: Boolean = false
7983

8084
/** Used to avoid allocation, its state does not matter */

compiler/src/dotty/tools/dotc/transform/init/Semantic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ object Semantic:
11371137
def checkClasses(classes: List[ClassSymbol])(using Context): Unit =
11381138
given Cache.Data()
11391139
for classSym <- classes if isConcreteClass(classSym) do
1140-
total += checkClass(classSym)
1140+
checkClass(classSym)
11411141

11421142
// ----- Semantic definition --------------------------------
11431143
type ArgInfo = TraceValue[Value]

0 commit comments

Comments
 (0)