Improve documentation of experimental annotations

This commit is contained in:
Ilya Gorbunov
2018-09-16 04:33:10 +03:00
parent 04f1f6086b
commit f2a51f96a5
6 changed files with 51 additions and 9 deletions
@@ -13,8 +13,11 @@ import kotlin.internal.RequireKotlinVersionKind
/**
* Marks the API that is dependent on the experimental unsigned types, including those types themselves.
*
* Usages of such API will be reported as warnings unless an explicit opt-in with the [UseExperimental] annotation
* or the `-Xuse-experimental=kotlin.ExperimentalUnsignedTypes` compiler option is done.
* Usages of such API will be reported as warnings unless an explicit opt-in with
* the [UseExperimental] annotation, e.g. `@UseExperimental(ExperimentalUnsignedTypes::class)`,
* or with the `-Xuse-experimental=kotlin.ExperimentalUnsignedTypes` compiler option is given.
*
* It's recommended to propagate the experimental status to the API that depends on unsigned types by annotating it with this annotation.
*/
@Experimental(level = Experimental.Level.WARNING)
@Target(CLASS, ANNOTATION_CLASS, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, TYPEALIAS)