[StubIr][Metadata] Add support for ObjCBlockVar type
This commit is contained in:
committed by
Sergey Bogolepov
parent
d0059092b7
commit
d4facccc6d
+3
@@ -217,6 +217,9 @@ object KotlinTypes {
|
|||||||
val objCObjectBase by InteropClassifier
|
val objCObjectBase by InteropClassifier
|
||||||
val objCObjectBaseMeta by InteropClassifier
|
val objCObjectBaseMeta by InteropClassifier
|
||||||
|
|
||||||
|
val objCBlockVar by InteropClassifier
|
||||||
|
val objCNotImplementedVar by InteropClassifier
|
||||||
|
|
||||||
val cValue by InteropClassifier
|
val cValue by InteropClassifier
|
||||||
|
|
||||||
private open class ClassifierAtPackage(val pkg: String) {
|
private open class ClassifierAtPackage(val pkg: String) {
|
||||||
|
|||||||
+6
@@ -190,6 +190,11 @@ private object PredefinedTypesHandler {
|
|||||||
return AbbreviatedType(cPointer, KotlinTypes.cArrayPointer, typeArguments, nullable)
|
return AbbreviatedType(cPointer, KotlinTypes.cArrayPointer, typeArguments, nullable)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun expandObjCBlockVar(typeArguments: List<TypeArgument>, nullable: Boolean): AbbreviatedType {
|
||||||
|
val underlyingType = ClassifierStubType(KotlinTypes.objCNotImplementedVar, typeArguments, nullable)
|
||||||
|
return AbbreviatedType(underlyingType, KotlinTypes.objCBlockVar, typeArguments, nullable)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return [ClassifierStubType] if [classifier] is a typealias from [kotlinx.cinterop] package.
|
* @return [ClassifierStubType] if [classifier] is a typealias from [kotlinx.cinterop] package.
|
||||||
*/
|
*/
|
||||||
@@ -201,6 +206,7 @@ private object PredefinedTypesHandler {
|
|||||||
KotlinTypes.cPointerVar -> expandCPointerVar(typeArguments, nullable)
|
KotlinTypes.cPointerVar -> expandCPointerVar(typeArguments, nullable)
|
||||||
KotlinTypes.objCObjectMeta -> expandObjCObjectMeta(typeArguments, nullable)
|
KotlinTypes.objCObjectMeta -> expandObjCObjectMeta(typeArguments, nullable)
|
||||||
KotlinTypes.cArrayPointer -> expandCArrayPointer(typeArguments, nullable)
|
KotlinTypes.cArrayPointer -> expandCArrayPointer(typeArguments, nullable)
|
||||||
|
KotlinTypes.objCBlockVar -> expandObjCBlockVar(typeArguments, nullable)
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user