[FIR] Fix K2: Introduced AMBIGUOUS_ANONYMOUS_TYPE_INFERRED

This commit is contained in:
Vladimir Sukharev
2023-09-20 14:56:39 +02:00
committed by Space Team
parent cd409abfd8
commit d7adc0ce32
2 changed files with 2 additions and 8 deletions
@@ -67,12 +67,6 @@ object FirAmbiguousAnonymousTypeChecker : FirBasicDeclarationChecker() {
context
)
}
for (typeArgument in type.typeArguments) {
checkTypeAndArguments(
typeArgument.type ?: continue,
context, reporter, reportOn
)
}
}
private val FirBlock.singleExpressionType
@@ -34,11 +34,11 @@ private inline fun foo22(crossinline f: () -> Int) = Inv(Inv(object : I1 {
fun bar(): Int = f()
}
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>private inline fun foo31(crossinline f: () -> Int)<!> = Inv(object : I1, I2 {
private inline fun foo31(crossinline f: () -> Int) = Inv(object : I1, I2 {
fun bar(): Int = f()
})
<!AMBIGUOUS_ANONYMOUS_TYPE_INFERRED!>private inline fun foo32(crossinline f: () -> Int)<!> = Inv(Inv(object : I1, I2 {
private inline fun foo32(crossinline f: () -> Int) = Inv(Inv(object : I1, I2 {
fun bar(): Int = f()
}))