Files
kotlin-fork/compiler/testData/codegen/box/suspendConversion/kt50949_suspendConversionForExtensionFunction.kt
T
Alexander Udalov 1e26888dd9 Psi2ir: fix parameter indices when generating extension invoke call
Incorrect `valueParameter` was passed to `generateValueArgument`, which
resulted in incorrect type being considered for generating suspend
conversion.

 #KT-50949 Fixed
2022-03-09 15:19:38 +01:00

9 lines
191 B
Kotlin
Vendored

// !LANGUAGE: +SuspendConversion
// IGNORE_BACKEND: JVM
fun box(): String {
val foo: String.(suspend () -> Unit) -> String = { this }
val f: () -> Unit = {}
return "OK".foo(f)
}