Experimental

annotation class Experimental(level: Experimental.Level)

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.

Since Kotlin

1.2

Constructors

Experimental
Link copied to clipboard
fun Experimental(level: Experimental.Level = Level.ERROR)

Types

Level
Link copied to clipboard
enum Level : Enum<Experimental.Level>

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.

Properties

level
Link copied to clipboard
val level: Experimental.Level