mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
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
49 lines
834 B
Kotlin
Vendored
49 lines
834 B
Kotlin
Vendored
// !API_VERSION: 1.0
|
|
|
|
val v1: String
|
|
@SinceKotlin("1.1")
|
|
get() = ""
|
|
|
|
@SinceKotlin("1.1")
|
|
val v2 = ""
|
|
|
|
var v3: String
|
|
@SinceKotlin("1.1")
|
|
get() = ""
|
|
set(value) {}
|
|
|
|
var v4: String
|
|
get() = ""
|
|
@SinceKotlin("1.1")
|
|
set(value) {}
|
|
|
|
var v5: String
|
|
@SinceKotlin("1.1")
|
|
get() = ""
|
|
@SinceKotlin("1.1")
|
|
set(value) {}
|
|
|
|
@SinceKotlin("1.1")
|
|
var v6: String
|
|
get() = ""
|
|
set(value) {}
|
|
|
|
@SinceKotlin("1.0")
|
|
val v7: String
|
|
@SinceKotlin("1.1")
|
|
get() = ""
|
|
|
|
fun test() {
|
|
<!API_NOT_AVAILABLE!>v1<!>
|
|
<!UNRESOLVED_REFERENCE!>v2<!>
|
|
<!API_NOT_AVAILABLE!>v3<!>
|
|
v3 = ""
|
|
v4
|
|
<!API_NOT_AVAILABLE!>v4<!> = ""
|
|
<!API_NOT_AVAILABLE!>v5<!>
|
|
<!API_NOT_AVAILABLE!>v5<!> = ""
|
|
<!UNRESOLVED_REFERENCE!>v6<!>
|
|
<!UNRESOLVED_REFERENCE!>v6<!> = ""
|
|
<!API_NOT_AVAILABLE!>v7<!>
|
|
}
|