[FE 1.0] Add fallback for extracting when call

This commit is contained in:
Victor Petukhov
2022-06-21 11:24:33 +02:00
committed by teamcity
parent 42e71f8c53
commit db54d18c72
8 changed files with 78 additions and 1 deletions
@@ -0,0 +1,15 @@
// WITH_STDLIB
interface FirExpression
interface FirNamedArgumentExpression : FirExpression {
val expression: FirNamedArgumentExpression
}
class AnnotationUseSiteTarget
private fun List<FirExpression>.toAnnotationUseSiteTargets2(): Set<AnnotationUseSiteTarget> =
flatMapTo(mutableSetOf()) { arg ->
when (val unwrappedArg = if (arg is FirNamedArgumentExpression) <!DEBUG_INFO_SMARTCAST!>arg<!>.expression else arg) {
is FirNamedArgumentExpression -> setOf()
else -> setOf()
}
}