Files
kotlin/compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/annotations.kt
Alexander Udalov 167ab1f860 Introduce "-api-version" CLI option
The `@SinceKotlin("X.Y.Z")` annotation now hides a particular declaration from
resolution when the API version specified by the `-api-version` option is
_less_ than X.Y.Z. The comparison is performed as for versions in Maven:
MavenComparableVersion is in fact a copy of
org.apache.maven.artifact.versioning.ComparableVersion.

Also support "!API_VERSION" directive in diagnostic tests

 #KT-14298 Fixed
2016-10-11 17:46:01 +03:00

12 lines
313 B
Kotlin
Vendored

// !API_VERSION: 1.0
@SinceKotlin("1.1")
annotation class Anno1(val s: String)
annotation class Anno2 @SinceKotlin("1.1") constructor()
@<!UNRESOLVED_REFERENCE, API_NOT_AVAILABLE, DEBUG_INFO_UNRESOLVED_WITH_TARGET!>Anno1<!>("")
@<!UNRESOLVED_REFERENCE, DEBUG_INFO_UNRESOLVED_WITH_TARGET!>Anno2<!>
fun t1() {}