From e49f881e7fadf2e9605cb1e23024165ba9e45baa Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Wed, 7 Oct 2020 09:31:07 +0300 Subject: [PATCH] [FIR2IR] Add more clear exception about absent setter (see KT-42496) --- .../src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt index f9385aba0a9..b183db96278 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt @@ -146,7 +146,8 @@ private fun FirCallableSymbol<*>.toSymbol(declarationStorage: Fir2IrDeclarationS val delegateSymbol = if (preferGetter) { syntheticProperty.getter.delegate.symbol } else { - syntheticProperty.setter!!.delegate.symbol + syntheticProperty.setter?.delegate?.symbol + ?: throw AssertionError("Written synthetic property must have a setter") } delegateSymbol.deepestMatchingOverriddenSymbol().toSymbol(declarationStorage, preferGetter) } ?: declarationStorage.getIrPropertySymbol(this)