[FIR] Unwrap error expressions when detecting USAGE_IS_NOT_INLINABLE
Otherwise, false positive USAGE_IS_NOT_INLINABLE may be detected ^KT-65316: Fixed
This commit is contained in:
committed by
Space Team
parent
ed246d372b
commit
cd5b38b958
@@ -101,6 +101,9 @@ fun <T : FirStatement> FirBlock.replaceFirstStatement(factory: (T) -> FirStateme
|
||||
return existing
|
||||
}
|
||||
|
||||
fun FirExpression.unwrapErrorExpression(): FirExpression? =
|
||||
if (this is FirErrorExpression) expression?.run { unwrapErrorExpression() } else this
|
||||
|
||||
fun FirExpression.unwrapArgument(): FirExpression = (this as? FirWrappedArgumentExpression)?.expression ?: this
|
||||
|
||||
fun FirExpression.unwrapAndFlattenArgument(flattenArrays: Boolean): List<FirExpression> = buildList { unwrapAndFlattenArgumentTo(this, flattenArrays) }
|
||||
|
||||
Reference in New Issue
Block a user