Report error when suspend call is illegal in the scope
Namely when it's not contained inside coroutine or another suspend function #KT-14924 In Progress
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
suspend fun foo() {}
|
||||
|
||||
fun noSuspend() {
|
||||
<!ILLEGAL_SUSPEND_FUNCTION_CALL!>foo<!>()
|
||||
}
|
||||
|
||||
class A {
|
||||
init {
|
||||
<!ILLEGAL_SUSPEND_FUNCTION_CALL!>foo<!>()
|
||||
}
|
||||
}
|
||||
|
||||
val x = <!ILLEGAL_SUSPEND_FUNCTION_CALL!>foo<!>()
|
||||
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
public val x: kotlin.Unit
|
||||
public suspend fun foo(): kotlin.Unit
|
||||
public fun noSuspend(): kotlin.Unit
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user