Files
kotlin-fork/idea/testData/intentions/convertLambdaToReference/suspendFunctionParameter.kt
T
Toshiaki Kameyama e822e871f5 KT-39532 Support intention to convert reference to lambda and vice versa for adapted references (#3495)
* Convert lambda to reference: support a function which has default parameters/unit return type/suspendability

#KT-39532 Fixed
2020-06-26 14:21:17 +03:00

16 lines
325 B
Kotlin
Vendored

// IS_APPLICABLE: false
// COMPILER_ARGUMENTS: -XXLanguage:-SuspendConversion
fun coroutine(block: suspend () -> Unit) {}
suspend fun testAction(obj: Any, action: suspend (Any) -> Unit) {
action(action)
}
fun println(message: Any?) {}
fun main() = coroutine {
testAction("OK") {<caret>
println(it)
}
}