Files
kotlin/compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/simpleMembers.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

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<!>() }