Fix deserialization of default property accessor flags
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
This commit is contained in:
+5
@@ -17555,6 +17555,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/reflection/annotations/retentions.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("setparam.kt")
|
||||
public void testSetparam() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/annotations/setparam.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClassAnnotation.kt")
|
||||
public void testSimpleClassAnnotation() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/annotations/simpleClassAnnotation.kt");
|
||||
|
||||
Reference in New Issue
Block a user