File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1566,17 +1566,17 @@ object Types {
15661566 /** The denotation currently denoted by this type */
15671567 final def denot (implicit ctx : Context ): Denotation = {
15681568 val now = ctx.period
1569- if (checkedPeriod == now) lastDenotation else denotAt(now)
1569+ val lastd = lastDenotation
1570+ if (checkedPeriod == now) lastd else denotAt(lastd, now)
15701571 }
15711572
15721573 /** A first fall back to do a somewhat more expensive calculation in case the first
15731574 * attempt in `denot` does not yield a denotation.
15741575 */
1575- private def denotAt (now : Period )(implicit ctx : Context ): Denotation = {
1576- val d = lastDenotation
1577- if (d != null && (d.validFor contains now)) {
1576+ private def denotAt (lastd : Denotation , now : Period )(implicit ctx : Context ): Denotation = {
1577+ if (lastd != null && (lastd.validFor contains now)) {
15781578 checkedPeriod = now
1579- d
1579+ lastd
15801580 }
15811581 else computeDenot
15821582 }
You can’t perform that action at this time.
0 commit comments