fix prop modality reading from class files
This commit is contained in:
@@ -160,6 +160,10 @@ public class PropertyCodegen {
|
||||
if(isTrait && !(kind instanceof OwnerKind.DelegateKind))
|
||||
flags |= Opcodes.ACC_ABSTRACT;
|
||||
|
||||
if (propertyDescriptor.getModality() == Modality.FINAL) {
|
||||
flags |= Opcodes.ACC_FINAL;
|
||||
}
|
||||
|
||||
JvmPropertyAccessorSignature signature = state.getTypeMapper().mapGetterSignature(propertyDescriptor, kind);
|
||||
final String descriptor = signature.getJvmMethodSignature().getAsmMethod().getDescriptor();
|
||||
String getterName = getterName(propertyDescriptor.getName());
|
||||
@@ -231,6 +235,10 @@ public class PropertyCodegen {
|
||||
if(isTrait && !(kind instanceof OwnerKind.DelegateKind))
|
||||
flags |= Opcodes.ACC_ABSTRACT;
|
||||
|
||||
if (propertyDescriptor.getModality() == Modality.FINAL) {
|
||||
flags |= Opcodes.ACC_FINAL;
|
||||
}
|
||||
|
||||
JvmPropertyAccessorSignature signature = state.getTypeMapper().mapSetterSignature(propertyDescriptor, kind);
|
||||
final String descriptor = signature.getJvmMethodSignature().getAsmMethod().getDescriptor();
|
||||
MethodVisitor mv = v.newMethod(origin, flags, setterName(propertyDescriptor.getName()), descriptor, null, null);
|
||||
|
||||
Reference in New Issue
Block a user