When in debugger context, access private companion object directly
This commit is contained in:
@@ -2651,12 +2651,9 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
"Containing declaration of the companion object " + companionObjectDescriptor +
|
||||
": expected a class, actual: " + hostClassDescriptor;
|
||||
|
||||
CodegenContext hostClassContext = context;
|
||||
while (hostClassContext.getContextDescriptor() != hostClassDescriptor) {
|
||||
hostClassContext = hostClassContext.getParentContext();
|
||||
assert hostClassContext != null :
|
||||
"Host class context for " + hostClassDescriptor + " not found in context hierarchy for " + context;
|
||||
}
|
||||
CodegenContext hostClassContext = context.findParentContextWithDescriptor(hostClassDescriptor);
|
||||
assert hostClassContext != null :
|
||||
"Host class context for " + hostClassDescriptor + " not found in context hierarchy for " + context;
|
||||
|
||||
hostClassContext.markCompanionObjectDescriptorWithAccessorRequired(companionObjectDescriptor);
|
||||
|
||||
|
||||
@@ -159,6 +159,10 @@ public class JvmCodegenUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isDebuggerContext(contextBeforeInline)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
CodegenContext context = contextBeforeInline.getFirstCrossInlineOrNonInlineContext();
|
||||
if (context.isInlineMethodContext()) {
|
||||
// Inline method can be called from a nested class.
|
||||
|
||||
Reference in New Issue
Block a user