From 99489321f1923907b5ca99486dea9487a1096075 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 19 Dec 2019 16:29:37 +0300 Subject: [PATCH] [FIR] Add forgotten test data for old FE test --- .../inference/regressions/kt32250.fir.kt | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/inference/regressions/kt32250.fir.kt 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 + } + ) +}