Requires Opt In
annotation class RequiresOptIn(message: String, level: RequiresOptIn.Level)
Content copied to clipboard
Signals that the annotated annotation class is a marker of an API that requires an explicit opt-in.
Call sites of any declaration annotated with that marker should opt in to the API either by using OptIn, or by being annotated with that marker themselves, effectively causing further propagation of the opt-in requirement.
This class requires opt-in itself and can only be used with the compiler argument -Xopt-in=kotlin.RequiresOptIn
.
Since Kotlin
1.3
Constructors
RequiresOptIn
Link copied to clipboard
fun RequiresOptIn(message: String = "", level: RequiresOptIn.Level = Level.ERROR)
Content copied to clipboard