mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
In MemberDeserializer.loadProperty, we incorrectly passed 0 to getAnnotations when loading annotations on property accessors in case the protobuf field getter_flags/setter_flags was not present. The correct behavior, as described in metadata.proto, was to pass a special "default accessor flags" value, constructed from the main property flags. Otherwise in case there were annotations both on the property and on the accessor (as in PropertyAndAccessor.kt) and the accessor was otherwise default, we would assume that it had no annotations and would not load them in compiler and reflection #KT-25499 In Progress
19 lines
335 B
Kotlin
Vendored
19 lines
335 B
Kotlin
Vendored
package test
|
|
|
|
annotation class A(val value: String)
|
|
annotation class B(val value: Array<String>)
|
|
|
|
interface I {
|
|
@A("property")
|
|
@get:B(["getter"])
|
|
var propertyAndGetter: Int
|
|
|
|
@A("property")
|
|
@set:B(["setter"])
|
|
var propertyAndSetter: Int
|
|
|
|
@get:A("getter")
|
|
@set:B(["setter"])
|
|
var getterAndSetter: Int
|
|
}
|