class C { constructor() /* primary */ { super/*Any*/() /* () */ } fun bar() { } } suspend fun foo0() { } fun foo1() { } fun foo2(vararg xs: Int) { } fun foo3(): Int { return 42 } fun foo4(i: Int = 42) { } fun fooInt(x: Int) { } fun testLambda() { useSuspend(fn = local suspend fun () { foo1() } ) } fun testNestedNullableParam() { useSuspendNestedNullable(fn = { // BLOCK local suspend fun foo1() { foo1() } ::foo1 }) } fun testNoCoversion() { useSuspend(fn = ::foo0) } fun testNullableParam() { useSuspendNullable(fn = { // BLOCK local suspend fun foo1() { foo1() } ::foo1 }) } fun testSuspendPlain() { useSuspend(fn = { // BLOCK local suspend fun foo1() { foo1() } ::foo1 }) } fun testSuspendWithArgs() { useSuspendInt(fn = { // BLOCK local suspend fun fooInt(p0: Int) { fooInt(x = p0) } ::fooInt }) } fun testWithBoundReceiver() { useSuspend(fn = { // BLOCK local suspend fun C.bar() { receiver.bar() } C()::bar }) } fun testWithCoercionToUnit() { useSuspend(fn = { // BLOCK local suspend fun foo3() { foo3() /*~> Unit */ } ::foo3 }) } fun testWithDefaults() { useSuspend(fn = { // BLOCK local suspend fun foo4() { foo4() } ::foo4 }) } fun testWithVararg() { useSuspend(fn = { // BLOCK local suspend fun foo2() { foo2() } ::foo2 }) } fun testWithVarargMapped() { useSuspendInt(fn = { // BLOCK local suspend fun foo2(p0: Int) { foo2(xs = [p0]) } ::foo2 }) } fun useSuspend(fn: SuspendFunction0) { } fun useSuspendInt(fn: SuspendFunction1) { } fun useSuspendNestedNullable(fn: SuspendFunction0?) { } fun useSuspendNullable(fn: SuspendFunction0?) { }