diff --git a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt index 3b14038f1fd..bbc656f017d 100644 --- a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt +++ b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt @@ -1018,16 +1018,8 @@ class StubGenerator( * requires non-trivial Kotlin adapter to convert arguments. */ private fun FunctionDecl.requiresKotlinAdapter(): Boolean { - if (platform != KotlinPlatform.NATIVE) { - return true - } - - return this.returnsRecord() || this.generateAsFfiVarargs() || - this.parameters.map { it.type }.any { - it.unwrapTypedefs() is RecordType || - representCFunctionParameterAsString(it) || - representCFunctionParameterAsValuesRef(it) != null - } + // TODO: restore this optimization after refactoring stub generator. + return true } /**