Add check already fixed variables in PostponedArgumentInputTypesResolver during adding constraints on them and using inside a functional type

^KT-42374 Fixed
This commit is contained in:
Victor Petukhov
2020-10-01 19:20:57 +03:00
parent 96ccf03794
commit 6c1dc43d25
8 changed files with 39 additions and 1 deletions
@@ -0,0 +1,8 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER
fun f(p: (Int) -> (String) -> Unit) {}
fun g(cond: Boolean) {
f(if (cond) { i -> { } } else { i -> { } })
}
@@ -0,0 +1,4 @@
package
public fun f(/*0*/ p: (kotlin.Int) -> (kotlin.String) -> kotlin.Unit): kotlin.Unit
public fun g(/*0*/ cond: kotlin.Boolean): kotlin.Unit