Don't put outer instance twice for anonymous object extending inner

#KT-5343 In Progress
This commit is contained in:
Alexander Udalov
2014-10-14 19:42:25 +04:00
parent 7315146753
commit 61674fb3d9
4 changed files with 43 additions and 1 deletions
@@ -1413,7 +1413,11 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
ResolvedCall<ConstructorDescriptor> superCall = closure.getSuperCall();
if (superCall != null) {
pushClosureOnStack(superCall.getResultingDescriptor().getContainingDeclaration(), putThis, callGenerator);
pushClosureOnStack(
superCall.getResultingDescriptor().getContainingDeclaration(),
putThis && closure.getCaptureThis() == null,
callGenerator
);
}
}