Files
kotlin-fork/compiler/testData/ir/irText/firProblems/LocalSuspendFun.kt
T
Dmitriy Novozhilov fb00c1dfb6 [FIR] Prohibit suspend anonymous functions in statement position
^KT-62018 Fixed
^KT-62019
2023-12-14 10:32:59 +00:00

16 lines
299 B
Kotlin
Vendored

// IGNORE_BACKEND_K2: ANY
// Ignore reasons: anonymous suspend functions are prohibited, KT-62018
// ISSUE: KT-58332
fun foo() {
val addNewStatusAction: suspend () -> Unit = useMemo {
suspend fun() {
}
}
}
fun <T> useMemo(callback: () -> T): T {
return callback()
}