Minor: improve message from future for use and useLines

Annotate RequireKotlin and apiVersionIsAtLeast with SinceKotlin
This commit is contained in:
Ilya Gorbunov
2017-10-15 19:36:15 +03:00
parent 88bb14d0b4
commit 18d4b91b2d
5 changed files with 6 additions and 4 deletions
@@ -95,6 +95,7 @@ internal annotation class AccessibleLateinitPropertyLiteral
*/
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.TYPEALIAS)
@Retention(AnnotationRetention.SOURCE)
@SinceKotlin("1.2")
internal annotation class RequireKotlin(
val version: String,
val message: String = "",
@@ -106,6 +107,7 @@ internal annotation class RequireKotlin(
/**
* The kind of the version that is required by [RequireKotlin].
*/
@SinceKotlin("1.2")
internal enum class RequireKotlinVersionKind {
LANGUAGE_VERSION,
COMPILER_VERSION,
@@ -72,6 +72,6 @@ private fun getJavaVersion(): Int {
* The function usages are validated to have literal argument values.
*/
@PublishedApi
@RequireKotlin("1.2", versionKind = RequireKotlinVersionKind.COMPILER_VERSION)
@SinceKotlin("1.2")
internal fun apiVersionIsAtLeast(major: Int, minor: Int, patch: Int) =
KotlinVersion.CURRENT.isAtLeast(major, minor, patch)