Files
kotlin-fork/compiler/testData/codegen/box/fir/callableReferenceConversionTopLevel.kt
T
Denis.Zharkov a38040680c K2: Do not use KFunctionN as representation type for adapted references
Beside some corner cases, it's already prohibited in K1 because
adaptation have a bit strange nature
(they don't represent any existing real function exactly)

^KT-55137 Fixed
2023-02-15 08:13:45 +00:00

10 lines
164 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
fun foo(x: String = "OK"): String = x
fun box(): String {
val f: () -> String = ::foo
return f()
}