Skip to content

Commit 6f01f5c

Browse files
committed
[stdlib] Fix platforms without the Objective-C runtime
1 parent 6fa05d4 commit 6f01f5c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stdlib/public/core/SetVariant.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,10 @@ extension Set._Variant {
449449
internal __consuming func intersection(
450450
_ other: Set<Element>
451451
) -> _NativeSet<Element> {
452+
#if _runtime(_ObjC)
452453
switch (self.isNative, other._variant.isNative) {
453454
case (true, true):
454455
return asNative.intersection(other._variant.asNative)
455-
#if _runtime(_ObjC)
456456
case (true, false):
457457
return asNative.genericIntersection(other)
458458
case (false, false):
@@ -471,7 +471,9 @@ extension Set._Variant {
471471
}
472472
}
473473
return result
474-
#endif
475474
}
475+
#else
476+
return asNative.intersection(other._variant.asNative)
477+
#endif
476478
}
477479
}

0 commit comments

Comments
 (0)