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
20 lines
301 B
Kotlin
Vendored
20 lines
301 B
Kotlin
Vendored
// !API_VERSION: 1.0
|
|
|
|
@SinceKotlin("1.1")
|
|
fun f() {}
|
|
|
|
@SinceKotlin("1.1")
|
|
var p = Unit
|
|
|
|
@SinceKotlin("1.1.2")
|
|
fun z() {}
|
|
|
|
|
|
fun t1() = <!UNRESOLVED_REFERENCE!>f<!>()
|
|
|
|
fun t2() = <!UNRESOLVED_REFERENCE!>p<!>
|
|
|
|
fun t3() { <!UNRESOLVED_REFERENCE!>p<!> = Unit }
|
|
|
|
fun t4() { <!UNRESOLVED_REFERENCE!>z<!>() }
|