blob: 3d4f97ee9cd65db1be8478a1006fe07044918fff [file]
// DIAGNOSTICS: -IMPLEMENTING_SUSPEND_FUNCTION_INTERFACE
// ^^^ Kotlin/JS partially forbids implementing suspend function interfaces and report this diagnostic
// WITH_STDLIB
// FILE: lib.kt
fun interface Foo: suspend () -> Unit
// FILE: main.kt
import kotlin.test.*
val x = suspend {}
val foo = Foo(x)
fun box(): String {
assertEquals(foo, foo) // Circumvent DCE.
return "OK"
}