Files
kotlin-fork/native/native.tests/testData/lldb/kt42208WithPassingLambdaToAnotherFunction.kt
T
Svyatoslav Scherbina b4c2164837 [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
2024-03-06 17:07:27 +00:00

19 lines
334 B
Kotlin
Vendored

// KIND: STANDALONE_LLDB
// FIR_IDENTICAL
// FILE: kt42208-1.kt
fun main() {
val a = foo()
bar(a)
}
// FILE: kt42208-2.kt
// aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
class A
val list = mutableListOf<A>()
inline fun foo() = { ->
list.add(A())
}
// FILE: kt42208-3.kt
fun bar(v:(()->Boolean)) {
v()
}