Fix handling nil result of NSSet.member for Kotlin Set (#1314)
This commit is contained in:
committed by
Nikolay Igotti
parent
d047f72a2e
commit
12bec9b22f
@@ -294,7 +294,10 @@ static inline id KSet_getElement(KRef set, id object) {
|
||||
ObjHolder requestHolder, resultHolder;
|
||||
KRef request = Kotlin_ObjCExport_refFromObjC(object, requestHolder.slot());
|
||||
KRef result = Kotlin_Set_getElement(set, request, resultHolder.slot());
|
||||
return refToObjCOrNSNull(result);
|
||||
|
||||
// Note: if result is nullptr, then it can't be a null element of the set, because request != nullptr;
|
||||
// so map nullptr to nullptr:
|
||||
return Kotlin_ObjCExport_refToObjC(result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user