[ObjCExport] Document 'ObjCExportStubOrigin' factory special case
This commit is contained in:
committed by
Space Team
parent
7ef62d1779
commit
7944a3dc4b
+6
-1
@@ -21,7 +21,12 @@ fun ObjCExportStubOrigin(descriptor: DeclarationDescriptor?): ObjCExportStubOrig
|
||||
return ObjCExportStubOrigin.Source(descriptor.name, descriptor.findKDocString(), (descriptor.source as? PsiSourceElement)?.psi)
|
||||
}
|
||||
|
||||
return ObjCExportStubOrigin.Binary(descriptor.name, descriptor.extractSerializedKdocString())
|
||||
/*
|
||||
This case is somewhat unexpected/esoteric:
|
||||
We expect the descriptor to either implement `DeserializedDescriptor` or `DeclarationDescriptorWithSource` (or both)
|
||||
The returned 'Binary' is a defensive measure.
|
||||
*/
|
||||
return ObjCExportStubOrigin.Binary(descriptor.name, kdoc = null)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user