Remove deprecated Experimental and UseExperimental annotation classes #KT-53864
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ class IrInterpreterHelpersSourceFilesProvider(testServices: TestServices) : Addi
|
||||
"./libraries/stdlib/src/kotlin/collections/Sequence.kt",
|
||||
)
|
||||
private val ANNOTATIONS_PATHS = arrayOf(
|
||||
"./libraries/stdlib/src/kotlin/annotations/Experimental.kt",
|
||||
"./libraries/stdlib/src/kotlin/annotations/WasExperimental.kt",
|
||||
"./libraries/stdlib/src/kotlin/annotations/ExperimentalStdlibApi.kt",
|
||||
"./libraries/stdlib/src/kotlin/annotations/OptIn.kt",
|
||||
"./libraries/stdlib/src/kotlin/internal/Annotations.kt",
|
||||
|
||||
@@ -1625,23 +1625,6 @@ public open class Exception : kotlin.Throwable {
|
||||
public constructor Exception(cause: kotlin.Throwable?)
|
||||
}
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.ANNOTATION_CLASS})
|
||||
@kotlin.annotation.Retention(value = AnnotationRetention.BINARY)
|
||||
@kotlin.SinceKotlin(version = "1.2")
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.6", warningSince = "1.4")
|
||||
@kotlin.Deprecated(message = "Please use RequiresOptIn instead.")
|
||||
public final annotation class Experimental : kotlin.Annotation {
|
||||
public constructor Experimental(level: kotlin.Experimental.Level = ...)
|
||||
|
||||
public final val level: kotlin.Experimental.Level { get; }
|
||||
|
||||
public final enum class Level : kotlin.Enum<kotlin.Experimental.Level> {
|
||||
enum entry WARNING
|
||||
|
||||
enum entry ERROR
|
||||
}
|
||||
}
|
||||
|
||||
@kotlin.RequiresOptIn
|
||||
@kotlin.annotation.MustBeDocumented
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPEALIAS})
|
||||
@@ -3773,15 +3756,4 @@ public open class UnsupportedOperationException : kotlin.RuntimeException {
|
||||
public constructor UnsupportedOperationException(message: kotlin.String?, cause: kotlin.Throwable?)
|
||||
|
||||
public constructor UnsupportedOperationException(cause: kotlin.Throwable?)
|
||||
}
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.EXPRESSION, AnnotationTarget.FILE, AnnotationTarget.TYPEALIAS})
|
||||
@kotlin.annotation.Retention(value = AnnotationRetention.SOURCE)
|
||||
@kotlin.SinceKotlin(version = "1.2")
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.6", warningSince = "1.4")
|
||||
@kotlin.Deprecated(message = "Please use OptIn instead.", replaceWith = kotlin.ReplaceWith(expression = "OptIn(*markerClass)", imports = {"kotlin.OptIn"}))
|
||||
public final annotation class UseExperimental : kotlin.Annotation {
|
||||
public constructor UseExperimental(vararg markerClass: kotlin.reflect.KClass<out kotlin.Annotation>)
|
||||
|
||||
public final val markerClass: kotlin.Array<out kotlin.reflect.KClass<out kotlin.Annotation>> { get; }
|
||||
}
|
||||
@@ -1469,23 +1469,6 @@ public open class Exception : kotlin.Throwable {
|
||||
public constructor Exception(cause: kotlin.Throwable?)
|
||||
}
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.ANNOTATION_CLASS})
|
||||
@kotlin.annotation.Retention(value = AnnotationRetention.BINARY)
|
||||
@kotlin.SinceKotlin(version = "1.2")
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.6", warningSince = "1.4")
|
||||
@kotlin.Deprecated(message = "Please use RequiresOptIn instead.")
|
||||
public final annotation class Experimental : kotlin.Annotation {
|
||||
public constructor Experimental(level: kotlin.Experimental.Level = ...)
|
||||
|
||||
public final val level: kotlin.Experimental.Level { get; }
|
||||
|
||||
public final enum class Level : kotlin.Enum<kotlin.Experimental.Level> {
|
||||
enum entry WARNING
|
||||
|
||||
enum entry ERROR
|
||||
}
|
||||
}
|
||||
|
||||
@kotlin.RequiresOptIn
|
||||
@kotlin.annotation.MustBeDocumented
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPEALIAS})
|
||||
@@ -3362,15 +3345,4 @@ public open class UnsupportedOperationException : kotlin.RuntimeException {
|
||||
public constructor UnsupportedOperationException(message: kotlin.String?, cause: kotlin.Throwable?)
|
||||
|
||||
public constructor UnsupportedOperationException(cause: kotlin.Throwable?)
|
||||
}
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.EXPRESSION, AnnotationTarget.FILE, AnnotationTarget.TYPEALIAS})
|
||||
@kotlin.annotation.Retention(value = AnnotationRetention.SOURCE)
|
||||
@kotlin.SinceKotlin(version = "1.2")
|
||||
@kotlin.DeprecatedSinceKotlin(errorSince = "1.6", warningSince = "1.4")
|
||||
@kotlin.Deprecated(message = "Please use OptIn instead.", replaceWith = kotlin.ReplaceWith(expression = "OptIn(*markerClass)", imports = {"kotlin.OptIn"}))
|
||||
public final annotation class UseExperimental : kotlin.Annotation {
|
||||
public constructor UseExperimental(vararg markerClass: kotlin.reflect.KClass<out kotlin.Annotation>)
|
||||
|
||||
public final val markerClass: kotlin.Array<out kotlin.reflect.KClass<out kotlin.Annotation>> { get; }
|
||||
}
|
||||
@@ -44,7 +44,7 @@ val copySources by task<Sync> {
|
||||
"kotlin/internal/Annotations.kt",
|
||||
"kotlin/contracts/ContractBuilder.kt",
|
||||
"kotlin/contracts/Effect.kt",
|
||||
"kotlin/annotations/Experimental.kt")
|
||||
"kotlin/annotations/WasExperimental.kt")
|
||||
into(File(buildDir, "src"))
|
||||
}
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package kotlin
|
||||
|
||||
import kotlin.annotation.AnnotationRetention.BINARY
|
||||
import kotlin.annotation.AnnotationRetention.SOURCE
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
import kotlin.internal.RequireKotlin
|
||||
import kotlin.internal.RequireKotlinVersionKind
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
/**
|
||||
* Signals that the annotated annotation class is a marker of an experimental API.
|
||||
*
|
||||
* Any declaration annotated with that marker is considered an experimental declaration
|
||||
* and its call sites should accept the experimental aspect of it either by using [UseExperimental],
|
||||
* or by being annotated with that marker themselves, effectively causing further propagation of that experimental aspect.
|
||||
*
|
||||
* This class is deprecated in favor of a more general approach provided by [RequiresOptIn]/[OptIn].
|
||||
*/
|
||||
@Target(ANNOTATION_CLASS)
|
||||
@Retention(BINARY)
|
||||
@SinceKotlin("1.2")
|
||||
@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6")
|
||||
@Deprecated("Please use RequiresOptIn instead.")
|
||||
public annotation class Experimental(val level: Level = Level.ERROR) {
|
||||
/**
|
||||
* Severity of the diagnostic that should be reported on usages of experimental API which did not explicitly accept the experimental aspect
|
||||
* of that API either by using [UseExperimental] or by being annotated with the corresponding marker annotation.
|
||||
*/
|
||||
public enum class Level {
|
||||
/** Specifies that a warning should be reported on incorrect usages of this experimental API. */
|
||||
WARNING,
|
||||
/** Specifies that an error should be reported on incorrect usages of this experimental API. */
|
||||
ERROR,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows to use experimental API denoted by the given markers in the annotated file, declaration, or expression.
|
||||
* If a declaration is annotated with [UseExperimental], its usages are **not** required to opt-in to that experimental API.
|
||||
*
|
||||
* This class is deprecated in favor of a more general approach provided by [RequiresOptIn]/[OptIn].
|
||||
*/
|
||||
@Target(
|
||||
CLASS, PROPERTY, LOCAL_VARIABLE, VALUE_PARAMETER, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, EXPRESSION, FILE, TYPEALIAS
|
||||
)
|
||||
@Retention(SOURCE)
|
||||
@SinceKotlin("1.2")
|
||||
@DeprecatedSinceKotlin(warningSince = "1.4", errorSince = "1.6")
|
||||
@Deprecated("Please use OptIn instead.", ReplaceWith("OptIn(*markerClass)", "kotlin.OptIn"))
|
||||
public annotation class UseExperimental(
|
||||
vararg val markerClass: KClass<out Annotation>
|
||||
)
|
||||
|
||||
|
||||
@Target(CLASS, PROPERTY, CONSTRUCTOR, FUNCTION, TYPEALIAS)
|
||||
@Retention(BINARY)
|
||||
internal annotation class WasExperimental(
|
||||
vararg val markerClass: KClass<out Annotation>
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package kotlin
|
||||
|
||||
import kotlin.annotation.AnnotationRetention.BINARY
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
|
||||
@Target(CLASS, PROPERTY, CONSTRUCTOR, FUNCTION, TYPEALIAS)
|
||||
@Retention(BINARY)
|
||||
internal annotation class WasExperimental(
|
||||
vararg val markerClass: KClass<out Annotation>
|
||||
)
|
||||
-15
@@ -49,17 +49,6 @@ public final class kotlin/ExceptionsKt {
|
||||
public static final fun stackTraceToString (Ljava/lang/Throwable;)Ljava/lang/String;
|
||||
}
|
||||
|
||||
public abstract interface annotation class kotlin/Experimental : java/lang/annotation/Annotation {
|
||||
public abstract fun level ()Lkotlin/Experimental$Level;
|
||||
}
|
||||
|
||||
public final class kotlin/Experimental$Level : java/lang/Enum {
|
||||
public static final field ERROR Lkotlin/Experimental$Level;
|
||||
public static final field WARNING Lkotlin/Experimental$Level;
|
||||
public static fun valueOf (Ljava/lang/String;)Lkotlin/Experimental$Level;
|
||||
public static fun values ()[Lkotlin/Experimental$Level;
|
||||
}
|
||||
|
||||
public abstract interface annotation class kotlin/ExperimentalMultiplatform : java/lang/annotation/Annotation {
|
||||
}
|
||||
|
||||
@@ -536,10 +525,6 @@ public final class kotlin/UnsignedKt {
|
||||
public static final fun ulongToDouble (J)D
|
||||
}
|
||||
|
||||
public abstract interface annotation class kotlin/UseExperimental : java/lang/annotation/Annotation {
|
||||
public abstract fun markerClass ()[Ljava/lang/Class;
|
||||
}
|
||||
|
||||
public final class kotlin/_Assertions {
|
||||
public static final field INSTANCE Lkotlin/_Assertions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user