Skip to content

Commit f1b591f

Browse files
committed
Update cachedIsStable comment
1 parent cd78e06 commit f1b591f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4178,9 +4178,12 @@ 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 the `StableRealizable` flag is
4185+
// computed on completion, and the time before is already covered by
4186+
// `isProvisional` which always returns true before completion.
41844187
if myisStableRunId != ctx.runId then
41854188
val res: Boolean = computeIsStable
41864189
// We don't cache if the type is provisional because `Type#isStable`

0 commit comments

Comments
 (0)