Use protocol name when creating objc protocol wrapper class
This commit is contained in:
+1
-1
@@ -444,7 +444,7 @@ internal abstract class ObjCContainerStubBuilder(
|
|||||||
metaContainerStub.protocolGetter!!
|
metaContainerStub.protocolGetter!!
|
||||||
} else {
|
} else {
|
||||||
// TODO: handle the case when protocol getter stub can't be compiled.
|
// TODO: handle the case when protocol getter stub can't be compiled.
|
||||||
context.generateNextUniqueId("kniprot_")
|
"${context.generateNextUniqueId("kniprot_")}_${container.name}"
|
||||||
}
|
}
|
||||||
AnnotationStub.ObjC.ExternalClass(protocolGetter)
|
AnnotationStub.ObjC.ExternalClass(protocolGetter)
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
package objcinterop {
|
||||||
|
@ExternalObjCClass(protocolGetter = "kniprot_objcinterop0_Simple") interface SimpleProtocol : ObjCObject
|
||||||
|
@ExternalObjCClass(protocolGetter = "kniprot_objcinterop0_Simple") interface SimpleProtocolMeta : ObjCObjectMeta /* = ObjCClass */
|
||||||
|
}
|
||||||
|
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
language = Objective-C
|
||||||
|
headers = protocol/protocol.h
|
||||||
|
package = objcinterop
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
@protocol Simple
|
||||||
|
@end
|
||||||
+6
@@ -192,6 +192,12 @@ public class CInteropFModulesTestGenerated extends AbstractNativeCInteropFModule
|
|||||||
runTest("native/native.tests/testData/CInterop/framework/frameworkDefs/modulesPod1/");
|
runTest("native/native.tests/testData/CInterop/framework/frameworkDefs/modulesPod1/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("protocolDefs")
|
||||||
|
public void testProtocolDefs() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/CInterop/framework/frameworkDefs/protocolDefs/");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("twoChildren")
|
@TestMetadata("twoChildren")
|
||||||
public void testTwoChildren() throws Exception {
|
public void testTwoChildren() throws Exception {
|
||||||
|
|||||||
+6
@@ -192,6 +192,12 @@ public class CInteropNoFModulesTestGenerated extends AbstractNativeCInteropNoFMo
|
|||||||
runTest("native/native.tests/testData/CInterop/framework/frameworkDefs/modulesPod1/");
|
runTest("native/native.tests/testData/CInterop/framework/frameworkDefs/modulesPod1/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("protocolDefs")
|
||||||
|
public void testProtocolDefs() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/CInterop/framework/frameworkDefs/protocolDefs/");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("twoChildren")
|
@TestMetadata("twoChildren")
|
||||||
public void testTwoChildren() throws Exception {
|
public void testTwoChildren() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user