提交 e3a23aed 编写于 作者: A Alexander Udalov

Minor, remove unneeded check in ClosureCodegen

Actually we do need to generate delegates to DefaultImpls even for Java
SAM wrappers, so this condition is incorrect. However, this never worked
properly anyway because of KT-12466.
上级 93e9d3e5
......@@ -27,7 +27,6 @@ import org.jetbrains.kotlin.descriptors.*;
import org.jetbrains.kotlin.descriptors.impl.SimpleFunctionDescriptorImpl;
import org.jetbrains.kotlin.incremental.components.NoLookupLocation;
import org.jetbrains.kotlin.load.java.JvmAbi;
import org.jetbrains.kotlin.load.java.descriptors.JavaClassDescriptor;
import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader;
import org.jetbrains.kotlin.metadata.ProtoBuf;
import org.jetbrains.kotlin.psi.KtElement;
......@@ -187,10 +186,9 @@ public class ClosureCodegen extends MemberCodegen<KtElement> {
generateClosureBody();
if (samType != null) {
ClassDescriptor funInterface = samType.getClassDescriptor();
if (!(funInterface instanceof JavaClassDescriptor)) {
SamWrapperCodegen.generateDelegatesToDefaultImpl(asmType, classDescriptor, funInterface, functionCodegen, state);
}
SamWrapperCodegen.generateDelegatesToDefaultImpl(
asmType, classDescriptor, samType.getClassDescriptor(), functionCodegen, state
);
}
this.constructor = generateConstructor();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册