From 795b6656dbe5b6086260c84211202581a1de2201 Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Sun, 10 Jul 2022 23:17:22 +0200 Subject: [PATCH] [LL FIR] fix possible race in cached value reading in ValueWithPostCompute --- .../analysis/low/level/api/fir/caches/ValueWithPostCompute.kt | 2 +- 1 file changed, 1 insertion(+), 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 35c20c8b095..c6694765d15 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 @@ -92,7 +92,7 @@ internal class ValueWithPostCompute( throw stateSnapshot.error } else -> { - return value as VALUE + return stateSnapshot as VALUE } } }