mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
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.
37 lines
953 B
Kotlin
Vendored
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
|