Introduce SinceKotlin annotation, check validity of its value

#KT-14297 Fixed
This commit is contained in:
Alexander Udalov
2016-09-26 19:52:51 +03:00
parent 8d660c2f6e
commit e3df8ed2fe
13 changed files with 215 additions and 2 deletions
+13 -1
View File
@@ -86,4 +86,16 @@ public annotation class Suppress(vararg val names: String)
@Target(TYPE)
@Retention(SOURCE)
@MustBeDocumented
public annotation class UnsafeVariance
public annotation class UnsafeVariance
/**
* Specifies the first version of Kotlin where a declaration has appeared.
* Using the declaration and specifying an older API version (via the `-api-version` command line option) will result in an error.
*
* @property version the version in the following formats: `<major>.<minor>` or `<major>.<minor>.<patch>`, where major, minor and patch
* are non-negative integer numbers without leading zeros.
*/
@Target(CLASS, PROPERTY, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
@Retention(AnnotationRetention.BINARY)
@MustBeDocumented
public annotation class SinceKotlin(val version: String)