Handle variadic block types in cinterop
#KT-36766 Fixed
This commit is contained in:
committed by
GitHub
parent
9722e32741
commit
7866c46bc7
+1
-1
@@ -688,7 +688,7 @@ internal class NativeIndexImpl(val library: NativeLibrary, val verbose: Boolean
|
||||
|
||||
private fun convertFunctionType(type: CValue<CXType>): Type {
|
||||
val kind = type.kind
|
||||
assert(kind == CXType_Unexposed || kind == CXType_FunctionProto)
|
||||
assert(kind == CXType_Unexposed || kind == CXType_FunctionProto || kind == CXType_FunctionNoProto) { kind }
|
||||
|
||||
if (clang_isFunctionTypeVariadic(type) != 0) {
|
||||
return VoidType // make this function pointer opaque.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
void kt36766(void (^block)()) {}
|
||||
@@ -0,0 +1,6 @@
|
||||
import kotlin.test.*
|
||||
import objcTests.*
|
||||
|
||||
@Test fun testKt36766() {
|
||||
kt36766(null)
|
||||
}
|
||||
Reference in New Issue
Block a user