[FIR] Inline FirExpression.coneTypeSafe und use resolvedType

The call-sites don't actually need to handle unresolved expressions,
they only need safe-casts to ConeClassLikeType or
ConeIntegerLiteralType.

#KT-61367
This commit is contained in:
Kirill Rakhman
2023-09-12 17:36:20 +02:00
committed by Space Team
parent a4fff7c7c0
commit 0d628c9e59
6 changed files with 9 additions and 21 deletions
@@ -41,9 +41,6 @@ val FirExpression.resolvedType: ConeKotlinType
withFirEntry("expression", this@resolvedType)
}
@UnresolvedExpressionTypeAccess
inline fun <reified T : ConeKotlinType> FirExpression.coneTypeSafe(): T? = (coneTypeOrNull as? T)
@OptIn(UnresolvedExpressionTypeAccess::class)
val FirExpression.isResolved: Boolean get() = coneTypeOrNull != null