From 85a096029c5130d5608048c811bc7e5d3955aa5a Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Thu, 21 Mar 2019 17:32:21 +0300 Subject: [PATCH] FIR: Do not fail on not calculated type --- .../src/org/jetbrains/kotlin/fir/resolve/calls/CallResolver.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CallResolver.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CallResolver.kt index 0caefacf217..ccc94e391cd 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CallResolver.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CallResolver.kt @@ -20,6 +20,7 @@ import org.jetbrains.kotlin.fir.scopes.processClassifiersByNameWithAction import org.jetbrains.kotlin.fir.service import org.jetbrains.kotlin.fir.symbols.* import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol +import org.jetbrains.kotlin.fir.types.ConeKotlinErrorType import org.jetbrains.kotlin.fir.types.ConeKotlinType import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.fir.types.coneTypeUnsafe @@ -207,7 +208,7 @@ fun createSimpleConsumer( ExplicitReceiverTowerDataConsumer(session, name, token, object : ReceiverValueWithPossibleTypes { override val type: ConeKotlinType get() = explicitReceiverType?.coneTypeUnsafe() - ?: throw AssertionError("No type calculated for ${explicitReceiver.renderWithType()}") + ?: ConeKotlinErrorType("No type calculated for: ${explicitReceiver.renderWithType()}") // TODO: assert here }, callKind) } else { NoExplicitReceiverTowerDataConsumer(session, name, token, callKind)