// !LANGUAGE: +SuspendConversion // !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION object Test1 { fun foo(f: () -> Unit) {} object Scope { fun foo(f: suspend () -> Unit) {} fun test(g: () -> Unit) { foo(g) } } } object Test2 { fun foo(f: suspend () -> T): T = TODO() suspend fun bar(): Int = 0 object Scope { fun bar(): String = "" fun test() { val result = foo(::bar) result } } } object Test3 { fun foo(f: suspend () -> T): T = TODO() suspend fun bar(x: Int = 42): Int = 0 object Scope { fun bar(x: Int = 42): String = "" fun test() { val result = foo(::bar) result } } }