Introduce RequiresOptIn and OptIn annotations

RequiresOptIn should be used now instead of Experimental, OptIn instead
of UseExperimental. See https://github.com/Kotlin/KEEP/pull/201.

This change adds the new declarations only to the stdlib, and supports
them in the compiler. Because of the way compiler loads annotations, we
need to bootstrap it first before deprecating the old annotations and
updating tests.

 #KT-34647 Fixed
This commit is contained in:
Alexander Udalov
2019-12-13 21:11:48 +03:00
parent 33bc3db144
commit cdbabf224f
17 changed files with 119 additions and 39 deletions
@@ -171,6 +171,7 @@ public annotation class JsQualifier(val value: String)
* or with the `-Xuse-experimental=kotlin.js.ExperimentalJsExport` compiler option is given.
*/
@Experimental(level = Experimental.Level.WARNING)
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
@SinceKotlin("1.3")
public annotation class ExperimentalJsExport