[interop][c][reverse] drop extensions check in function generator (KT-36639)

- Initially this check was done with assumption that extension function couldn't be overrided
This commit is contained in:
Vasily Levchenko
2021-01-28 16:09:44 +01:00
parent d84c83d7da
commit f887dcb79a
@@ -214,7 +214,7 @@ private class ExportedElement(val kind: ElementKind,
cname = "_konan_function_${owner.nextFunctionIndex()}"
val llvmFunction = owner.codegen.llvmFunction(irFunction)
// If function is virtual, we need to resolve receiver properly.
val bridge = if (!DescriptorUtils.isTopLevelDeclaration(function) && !function.isExtension &&
val bridge = if (!DescriptorUtils.isTopLevelDeclaration(function) &&
irFunction.isOverridable) {
// We need LLVMGetElementType() as otherwise type is function pointer.
generateFunction(owner.codegen, LLVMGetElementType(llvmFunction.type)!!, cname) {