提交 af34bf9a 编写于 作者: M Maxim Shafirov

Generate call to super even if not explisit.

上级 7a5d69b0
......@@ -192,8 +192,16 @@ public class ClassCodegen {
frameMap.enter(parameter, argTypes[i].getSize());
}
List<JetDelegationSpecifier> specifiers = aClass.getDelegationSpecifiers();
if (specifiers.isEmpty() || !(specifiers.get(0) instanceof JetDelegatorToSuperCall)) {
String superClass = getSuperClass(aClass, kind);
iv.load(0, Type.getType("L" + superClass + ";"));
iv.invokespecial(superClass, "<init>", method.getDescriptor());
}
int n = 0;
for (JetDelegationSpecifier specifier : aClass.getDelegationSpecifiers()) {
for (JetDelegationSpecifier specifier : specifiers) {
boolean instanceOnStack = pushDelegateInstance(specifier, kind, codegen, iv, n);
if (instanceOnStack) {
JetType superType = bindingContext.resolveTypeReference(specifier.getTypeReference());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册