Files
kotlin/compiler/testData/codegen/bytecodeListing/annotations/defaultTargets.kt
Alexander Udalov e2a42446ed Use getter names for $annotations methods in most codegen tests
This is needed to update master to 1.4, while still testing the latest
compiler by default. Also add one test on the old behavior.
2019-12-30 16:29:13 +01:00

37 lines
953 B
Kotlin
Vendored

// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
@Target(AnnotationTarget.PROPERTY)
annotation class AnnProperty
@Target(AnnotationTarget.FIELD)
annotation class AnnField
@Target(AnnotationTarget.FIELD, AnnotationTarget.PROPERTY)
annotation class AnnFieldProperty
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.PROPERTY)
annotation class AnnParameterProperty
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD)
annotation class AnnParameterField
@Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE)
annotation class AnnTypeField
public class A(
@AnnProperty @AnnField @AnnFieldProperty @AnnParameterProperty @AnnParameterField @AnnTypeField
public val x: Int
) {
@AnnProperty @AnnField @AnnFieldProperty @AnnParameterProperty @AnnParameterField @AnnTypeField
public val a: Int = 1
}
@Target(AnnotationTarget.FIELD)
annotation class Anno
@Anno
val p2: Int = 4
get() = field