JVM: don't generate nullability annotations on property delegate fields
Such fields are private, so these annotations are redundant. They were incorrect, anyway (property type was used instead of delegate type).
This commit is contained in:
@@ -196,7 +196,9 @@ public abstract class AnnotationCodegen {
|
||||
return;
|
||||
}
|
||||
|
||||
if (returnType != null && !AsmUtil.isPrimitive(returnType)) {
|
||||
if (returnType != null && !AsmUtil.isPrimitive(returnType) &&
|
||||
!(descriptor instanceof PropertyDescriptor && ((PropertyDescriptor) descriptor).isDelegated())
|
||||
) {
|
||||
generateNullabilityAnnotation(descriptor.getReturnType(), annotationDescriptorsAlreadyPresent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user