Add language feature for suspend functions in fun interfaces

Since in 1.5 JVM_IR is enabled by default and supports suspend functions
in fun interfaces, it is safe to enable the feature by default as well.
This commit is contained in:
Ilmir Usmanov
2021-01-18 13:30:52 +01:00
parent 6aa6f82c47
commit d1ee45b518
9 changed files with 82 additions and 1 deletions
@@ -0,0 +1,5 @@
// LANGUAGE: -SuspendFunctionsInFunInterfaces, +JvmIrEnabledByDefault
fun interface I {
suspend fun foo()
}
@@ -0,0 +1,5 @@
// LANGUAGE: -SuspendFunctionsInFunInterfaces, +JvmIrEnabledByDefault
fun interface I {
<!FUN_INTERFACE_WITH_SUSPEND_FUNCTION!>suspend<!> fun foo()
}
@@ -0,0 +1,8 @@
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
}
@@ -0,0 +1,6 @@
// FIR_IDENTICAL
// LANGUAGE: +SuspendFunctionsInFunInterfaces, +JvmIrEnabledByDefault
fun interface I {
suspend fun foo()
}
@@ -0,0 +1,8 @@
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
}