Do not write version requirements for suspend functions
Coroutines are a stable feature since 1.3. Version requirement on suspend functions, or functions mentioning suspend function types in the signature, was needed to prevent older compilers from reading metadata that they can't properly use. It's not needed anymore because a newer metadata version prevents older compilers from reading any metadata altogether. Also, computing isSuspendOrHasSuspendTypesInSignature took ~0.5% of backend time on compilation of intellij (related to KT-48233).
This commit is contained in:
@@ -8,7 +8,6 @@ public final class SimpleClass<in T#0 /* A */> : kotlin/Any {
|
||||
// signature: <init>(I)V
|
||||
public constructor(p: kotlin/Int /* = ... */)
|
||||
|
||||
// requires language version 1.3.0 (level=ERROR)
|
||||
// signature: g(Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
protected final inline suspend fun <reified T#1 /* T */> g(crossinline a: kotlin/Function0<T#0>, noinline b: suspend kotlin/Function1<kotlin/coroutines/Continuation<T#1>, kotlin/Any?>): kotlin/Unit
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ public final value class A : kotlin/Any {
|
||||
// requires language version 1.3.0 (level=ERROR)
|
||||
public final value class B : kotlin/Any {
|
||||
|
||||
// requires language version 1.3.0 (level=ERROR)
|
||||
// requires language version 1.3.0 (level=ERROR)
|
||||
// signature: constructor-impl(Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function1;
|
||||
public constructor(f: suspend kotlin/Function1<kotlin/coroutines/Continuation<kotlin/Unit>, kotlin/Any?>)
|
||||
@@ -45,7 +44,6 @@ public final value class B : kotlin/Any {
|
||||
// signature: toString-impl(Lkotlin/jvm/functions/Function1;)Ljava/lang/String;
|
||||
public open /* synthesized */ fun toString(): kotlin/String
|
||||
|
||||
// requires language version 1.3.0 (level=ERROR)
|
||||
// field: f:Lkotlin/jvm/functions/Function1;
|
||||
private final val f: suspend kotlin/Function1<kotlin/coroutines/Continuation<kotlin/Unit>, kotlin/Any?>
|
||||
private final get
|
||||
|
||||
Reference in New Issue
Block a user