[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) arg.expression else arg) {
is FirNamedArgumentExpression -> setOf()
else -> setOf()
}
}
@@ -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()
}
}
@@ -0,0 +1,23 @@
package
private fun kotlin.collections.List<FirExpression>.toAnnotationUseSiteTargets2(): kotlin.collections.Set<AnnotationUseSiteTarget>
public final class AnnotationUseSiteTarget {
public constructor AnnotationUseSiteTarget()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public interface FirExpression {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public interface FirNamedArgumentExpression : FirExpression {
public abstract val expression: FirNamedArgumentExpression
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}