[FIR] Replace FirExpression.typeRef.coneType (and variants) with FirExpression.coneType

#KT-59855
This commit is contained in:
Kirill Rakhman
2023-07-31 17:36:01 +02:00
committed by Space Team
parent 1472b21993
commit 9ec814b7ad
108 changed files with 289 additions and 299 deletions
@@ -37,6 +37,14 @@ val FirTypeRef.coneType: ConeKotlinType
val FirTypeRef.coneTypeOrNull: ConeKotlinType?
get() = coneTypeSafe()
val FirExpression.coneType: ConeKotlinType get() = typeRef.coneType
val FirExpression.coneTypeOrNull: ConeKotlinType? get() = typeRef.coneTypeOrNull
inline fun <reified T : ConeKotlinType> FirExpression.coneTypeSafe(): T? = typeRef.coneTypeSafe()
inline fun <reified T : ConeKotlinType> FirExpression.coneTypeUnsafe(): T = typeRef.coneTypeUnsafe()
@RequiresOptIn(
"This type check never expands type aliases. Use with care (probably Ok for expression & constructor types). " +
"Generally this.coneType.fullyExpandedType(session).isSomeType is better"