Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt
T
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00

45 lines
943 B
Kotlin
Vendored

@Target(AnnotationTarget.FIELD)
annotation class Field
<!WRONG_ANNOTATION_TARGET!>@Field<!>
annotation class Another
@Field
val x: Int = 42
<!WRONG_ANNOTATION_TARGET!>@Field<!>
val y: Int
get() = 13
<!WRONG_ANNOTATION_TARGET!>@Field<!>
abstract class My(<!WRONG_ANNOTATION_TARGET!>@Field<!> arg: Int, @Field val w: Int) {
@Field
val x: Int = arg
<!WRONG_ANNOTATION_TARGET!>@Field<!>
val y: Int
get() = 0
<!WRONG_ANNOTATION_TARGET!>@Field<!>
abstract val z: Int
<!WRONG_ANNOTATION_TARGET!>@Field<!>
fun foo() {}
<!WRONG_ANNOTATION_TARGET!>@Field<!>
val v: Int by <!UNRESOLVED_REFERENCE!>Delegates<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE{OI}, DEBUG_INFO_MISSING_UNRESOLVED{NI}!>lazy<!> { 42 }
}
enum class Your {
@Field FIRST
}
interface His {
<!WRONG_ANNOTATION_TARGET!>@Field<!>
val x: Int
<!WRONG_ANNOTATION_TARGET!>@Field<!>
val y: Int
get() = 42
}