diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt32250.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt32250.fir.kt new file mode 100644 index 00000000000..bf32f159b54 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt32250.fir.kt @@ -0,0 +1,30 @@ +// !LANGUAGE: +NewInference +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE + +interface I { + fun foo() +} + +data class Pair(val fst: X, val snd: Y) + +class A(f: Pair Unit>? = null) + +class B(f: ((I) -> Unit)? = null) + +fun main() { + val cond = true + A( + if (cond) { + Pair(1, { baz -> baz.foo() }) + } else { + null + } + ) + B( + if (cond) { + { baz -> baz.foo() } + } else { + null + } + ) +}