Skip to content

Commit 1e676d0

Browse files
committed
stdlib: type-erased collections: add forwarding for '_customContainsEquatableElement()'
1 parent 4ab09b4 commit 1e676d0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

stdlib/public/core/ExistentialCollection.swift.gyb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,12 @@ extension Any${Kind} {
667667
whereSeparator: isSeparator)
668668
}
669669

670+
public func _customContainsEquatableElement(
671+
_ element: Element
672+
) -> Bool? {
673+
return _box.__customContainsEquatableElement(element)
674+
}
675+
670676
public func _preprocessingPass<R>(
671677
_ preprocess: () throws -> R
672678
) rethrows -> R? {

validation-test/stdlib/ExistentialCollection.swift.gyb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ tests.test("${TestedType}: dispatch to wrapped") {
183183
_ = s.split { (_) in true }
184184
}
185185

186+
Log._customContainsEquatableElement.expectIncrement(Base.self) {
187+
_ = s._customContainsEquatableElement(OpaqueValue(42))
188+
}
189+
186190
Log._preprocessingPass.expectIncrement(Base.self) {
187191
_ = s._preprocessingPass {}
188192
}

0 commit comments

Comments
 (0)