From c46c723a1b43485485fe2e33fb31ca959d612343 Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Sun, 10 Jul 2022 23:20:33 +0200 Subject: [PATCH] [LL FIR] invalidate ValueWithPostCompute cache state on PCE --- .../analysis/low/level/api/fir/caches/ValueWithPostCompute.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/caches/ValueWithPostCompute.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/caches/ValueWithPostCompute.kt index c6694765d15..97e24b27f63 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/caches/ValueWithPostCompute.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/caches/ValueWithPostCompute.kt @@ -78,7 +78,9 @@ internal class ValueWithPostCompute( _postCompute!!(key, calculated, data) calculated } catch (e: Throwable) { - if (e !is ProcessCanceledException) { + if (e is ProcessCanceledException) { + value = ValueIsNotComputed + } else { value = ExceptionWasThrownDuringValueComputation(e) } throw e