Very annoying and helpless error from `cinterop` i...
# kotlin-native
r
Very annoying and helpless error from
cinterop
if you have 20 macro-proxy func with 3 args in
.def
😫
Copy code
Exception in thread "main" java.lang.Error: /tmp/tmp399964332777824085.c:103:38: error: too many arguments to function call, expected 2, have 3
        at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:137)
        at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.indexDeclarations(Indexer.kt:902)
        at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:892)
        at org.jetbrains.kotlin.native.interop.indexer.NativeIndexKt.buildNativeIndex(NativeIndex.kt:56)
        at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:283)
        at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:38)
        at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:100)
        at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:29)
o
could you please provide more compact reproducer? from first glimpse error looks clear, function with two arguments is called with 3
r
Yes, error message is correct, but it point to nonexistent temporary file
/tmp/tmp399964332777824085.c:103:38
instead of original
.def
. Printing of original string will be very helpful with large
def
-files. At least the name of the function.
o
Not sure if this is something we immediately support, but thanks for letting us know