experiment
diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConstChecks.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConstChecks.kt
index c4f03fd..199ebbc 100644
--- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConstChecks.kt
+++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirConstChecks.kt
@@ -213,7 +213,11 @@
}
propertySymbol.isLocal -> return ConstantArgumentKind.NOT_CONST
propertyAccessExpression.getExpandedType().classId == StandardClassIds.KClass -> return ConstantArgumentKind.NOT_KCLASS_LITERAL
- propertySymbol.isConst -> return ConstantArgumentKind.VALID_CONST
+ propertySymbol.isConst -> {
+ propertyAccessExpression.dispatchReceiver.takeIf { it !is FirThisReceiverExpression }?.accept(this, data)?.ifNotValidConst { return it }
+ propertyAccessExpression.extensionReceiver.takeIf { it !is FirThisReceiverExpression }?.accept(this, data)?.ifNotValidConst { return it }
+ return ConstantArgumentKind.VALID_CONST
+ }
}
// Ok, because we only look at the structure, not resolution-dependent properties.