Prevent unsafe publication of not fully initialized instance
#KT-54085 Fixed #EA-757831
This commit is contained in:
committed by
Space Team
parent
1c1b6ff92a
commit
79b8954814
+5
-4
@@ -122,10 +122,6 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
|||||||
this.c = c;
|
this.c = c;
|
||||||
|
|
||||||
classOrObject = classLikeInfo.getCorrespondingClassOrObject();
|
classOrObject = classLikeInfo.getCorrespondingClassOrObject();
|
||||||
if (classOrObject != null) {
|
|
||||||
this.c.getTrace().record(BindingContext.CLASS, classOrObject, this);
|
|
||||||
}
|
|
||||||
this.c.getTrace().record(BindingContext.FQNAME_TO_CLASS_DESCRIPTOR, DescriptorUtils.getFqName(this), this);
|
|
||||||
|
|
||||||
this.declarationProvider = c.getDeclarationProviderFactory().getClassMemberDeclarationProvider(classLikeInfo);
|
this.declarationProvider = c.getDeclarationProviderFactory().getClassMemberDeclarationProvider(classLikeInfo);
|
||||||
|
|
||||||
@@ -345,6 +341,11 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
|
|||||||
|
|
||||||
return contextReceiverDescriptors;
|
return contextReceiverDescriptors;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (classOrObject != null) {
|
||||||
|
this.c.getTrace().record(BindingContext.CLASS, classOrObject, this);
|
||||||
|
}
|
||||||
|
this.c.getTrace().record(BindingContext.FQNAME_TO_CLASS_DESCRIPTOR, DescriptorUtils.getFqName(this), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isIllegalInner(@NotNull DeclarationDescriptor descriptor) {
|
private static boolean isIllegalInner(@NotNull DeclarationDescriptor descriptor) {
|
||||||
|
|||||||
Reference in New Issue
Block a user