Implement copy in FunctionDescriptorImpl, call doSubstitute only in CopyConfiguration#build

This commit is contained in:
Alexander Udalov
2016-06-08 17:28:37 +03:00
parent ee8ca0b850
commit dc2972d99e
4 changed files with 32 additions and 34 deletions
@@ -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();
}
};
}