Consider property accessor non-default if it has annotations
Otherwise we're not trying to load annotations on the parameter of the property setter in MemberDeserializer.loadProperty. Note that after this commit, we could now also assume that if getter/setter is default, it has no annotations, and thus use Annotations.EMPTY for default getter/setter in loadProperty. However, this would cause reflection to work incorrectly on classes compiled by an older Kotlin compiler, so we'll still try to load annotations on default accessors for an indefinite time. #KT-25499 Fixed
This commit is contained in:
+1
-1
@@ -128,7 +128,7 @@ class MemberDeserializer(private val c: DeserializationContext) {
|
||||
} else {
|
||||
DescriptorFactory.createDefaultSetter(
|
||||
property, annotations,
|
||||
Annotations.EMPTY /* Otherwise presumably the setter is not default */
|
||||
Annotations.EMPTY /* Otherwise the setter is not default, see DescriptorResolver.resolvePropertySetterDescriptor */
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user