Skip to content

Commit a000229

Browse files
committed
Update cachedIsStable comment
1 parent cd78e06 commit a000229

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4178,9 +4178,11 @@ object Types {
41784178
myGround > 0
41794179

41804180
private[Types] def cachedIsStable(using Context): Boolean =
4181-
// We need to invalidate the cache when the period changes because the
4182-
// case `TermRef` of `Type#isStable` reads denotations, which depend on
4183-
// the period. See docs/_docs/internals/periods.md for more information.
4181+
// We need to invalidate the cache when the run changes because the case
4182+
// `TermRef` of `Type#isStable` reads denotations, which depend on the
4183+
// run. See docs/_docs/internals/periods.md for more information. We do
4184+
// not need to check the phase because once a type is not provisional, its
4185+
// stability should not change anymore.
41844186
if myisStableRunId != ctx.runId then
41854187
val res: Boolean = computeIsStable
41864188
// We don't cache if the type is provisional because `Type#isStable`

0 commit comments

Comments
 (0)