Skip to content

Commit 0582474

Browse files
committed
[skip ci] Do not cache tryCompiletimeConstantFold if isProvisional
1 parent 96e1870 commit 0582474

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4215,8 +4215,9 @@ object Types {
42154215

42164216
def tryCompiletimeConstantFold(using Context): Type =
42174217
if myTryCompiletimeConstantFoldPeriod != ctx.period then
4218-
myTryCompiletimeConstantFoldPeriod = ctx.period
42194218
myTryCompiletimeConstantFold = tryCompiletimeConstantFoldImpl
4219+
if !isProvisional then
4220+
myTryCompiletimeConstantFoldPeriod = ctx.period
42204221
myTryCompiletimeConstantFold.nn
42214222

42224223
private def tryCompiletimeConstantFoldImpl(using Context): Type = tycon match {

0 commit comments

Comments
 (0)