Minor: CodegenContext.isContextWithUninitializedThis()
This commit is contained in:
@@ -348,11 +348,15 @@ public abstract class CodegenContext<T extends DeclarationDescriptor> {
|
||||
return parentContext;
|
||||
}
|
||||
|
||||
public boolean isContextWithUninitializedThis() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public CodegenContext getEnclosingClassContext() {
|
||||
CodegenContext cur = getParentContext();
|
||||
while (cur != null) {
|
||||
if (cur instanceof ConstructorContext && !(((ConstructorContext) cur).isThisInitialized())) {
|
||||
if (cur.isContextWithUninitializedThis()) {
|
||||
// If the current context is a constructor with uninitialized 'this',
|
||||
// skip it and the corresponding class context
|
||||
CodegenContext parent = cur.getParentContext();
|
||||
|
||||
@@ -59,6 +59,11 @@ public class ConstructorContext extends MethodContext {
|
||||
this.thisInitialized = thisInitialized;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isContextWithUninitializedThis() {
|
||||
return !isThisInitialized();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Constructor: " + (isThisInitialized() ? "" : "UNINITIALIZED ") + getContextDescriptor();
|
||||
|
||||
Reference in New Issue
Block a user