Implement copy in FunctionDescriptorImpl, call doSubstitute only in CopyConfiguration#build
This commit is contained in:
+4
-15
@@ -269,9 +269,10 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
||||
ConstructorDescriptor primaryConstructor = getUnsubstitutedPrimaryConstructor();
|
||||
if (primaryConstructor != null) return primaryConstructor;
|
||||
|
||||
return new FunctionDescriptorImpl(LazyClassDescriptor.this, null, Annotations.Companion.getEMPTY(),
|
||||
Name.special("<init-blocks>"),
|
||||
CallableMemberDescriptor.Kind.SYNTHESIZED, SourceElement.NO_SOURCE) {
|
||||
return new FunctionDescriptorImpl(
|
||||
LazyClassDescriptor.this, null, Annotations.Companion.getEMPTY(), Name.special("<init-blocks>"),
|
||||
CallableMemberDescriptor.Kind.SYNTHESIZED, SourceElement.NO_SOURCE
|
||||
) {
|
||||
@NotNull
|
||||
@Override
|
||||
protected FunctionDescriptorImpl createSubstitutedCopy(
|
||||
@@ -284,18 +285,6 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
||||
) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public FunctionDescriptor copy(
|
||||
DeclarationDescriptor newOwner,
|
||||
Modality modality,
|
||||
Visibility visibility,
|
||||
Kind kind,
|
||||
boolean copyOverrides
|
||||
) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user