Check for backend when checking for suspend in fun interfaces
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
$TESTDATA_DIR$/suspendInFunInterfaceIrDisabled.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xuse-old-backend
|
||||
@@ -0,0 +1,3 @@
|
||||
fun interface FIC {
|
||||
suspend fun foo()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
compiler/testData/cli/jvm/suspendInFunInterfaceIrDisabled.kt:2:5: error: 'suspend' modifier is not allowed on a single abstract member
|
||||
suspend fun foo()
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
@@ -0,0 +1,4 @@
|
||||
$TESTDATA_DIR$/suspendInFunInterfaceIrEnabled.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xuse-ir
|
||||
@@ -0,0 +1,3 @@
|
||||
fun interface FIC {
|
||||
suspend fun foo()
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
OK
|
||||
@@ -1,5 +0,0 @@
|
||||
// LANGUAGE: -SuspendFunctionsInFunInterfaces, +JvmIrEnabledByDefault
|
||||
|
||||
fun interface I {
|
||||
suspend fun foo()
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// LANGUAGE: -SuspendFunctionsInFunInterfaces, +JvmIrEnabledByDefault
|
||||
|
||||
fun interface I {
|
||||
<!FUN_INTERFACE_WITH_SUSPEND_FUNCTION!>suspend<!> fun foo()
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package
|
||||
|
||||
public fun interface I {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract suspend fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
// FIR_IDENTICAL
|
||||
// LANGUAGE: +SuspendFunctionsInFunInterfaces, +JvmIrEnabledByDefault
|
||||
|
||||
fun interface I {
|
||||
suspend fun foo()
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package
|
||||
|
||||
public fun interface I {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract suspend fun foo(): kotlin.Unit
|
||||
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