[K/N][tests] Fix kt42208WithPassingLambdaToAnotherFunction.kt for K2

It seems that K2 doesn't support `UnitConversionsOnArbitraryExpressions`
experimental language feature (KT-56011), while the test accidentally
relied on it.

Improve the test code so that it doesn't need this language feature
anymore, and enable the test for K2.

^KT-65553 Fixed
This commit is contained in:
Svyatoslav Scherbina
2024-03-05 19:41:20 +01:00
committed by Space Team
parent b7129f78a3
commit b4c2164837
2 changed files with 7 additions and 11 deletions
@@ -1,9 +1,5 @@
// KIND: STANDALONE_LLDB
// FREE_COMPILER_ARGS: -XXLanguage:+UnitConversionsOnArbitraryExpressions
// IGNORE_BACKEND_K2: NATIVE
// FIR_IDENTICAL
// Not really `FIR_IDENTICAL`, because we ignore thois test for FIR, but with this directive presented we don't need to create separate `fir.txt` file for dump.
// FILE: kt42208-1.kt
fun main() {
val a = foo()
@@ -17,6 +13,6 @@ inline fun foo() = { ->
list.add(A())
}
// FILE: kt42208-3.kt
fun bar(v:(()->Unit)) {
fun bar(v:(()->Boolean)) {
v()
}