Minor: simplify code
This commit is contained in:
@@ -417,12 +417,7 @@ public abstract class CodegenContext<T extends DeclarationDescriptor> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean shouldAddChild(@NotNull CodegenContext child) {
|
protected boolean shouldAddChild(@NotNull CodegenContext child) {
|
||||||
DeclarationDescriptor childContextDescriptor = child.contextDescriptor;
|
return DescriptorUtils.isClassObject(child.contextDescriptor);
|
||||||
if (childContextDescriptor instanceof ClassDescriptor) {
|
|
||||||
ClassKind kind = ((ClassDescriptor) childContextDescriptor).getKind();
|
|
||||||
return kind == ClassKind.CLASS_OBJECT;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|||||||
Reference in New Issue
Block a user