@@ -59,13 +59,15 @@ internal var _emptyArrayStorage : _EmptyArrayStorage {
59
59
Builtin . addressof ( & _swiftEmptyArrayStorage) )
60
60
}
61
61
62
- // FIXME(ABI)#141 : This whole class is a workaround for
63
- // <rdar://problem/18560464> Can't override generic method in generic
64
- // subclass. If it weren't for that bug, we'd override
65
- // _withVerbatimBridgedUnsafeBuffer directly in
66
- // _ContiguousArrayStorage<Element>.
67
- // rdar://problem/19341002
68
- class _ContiguousArrayStorage1 : _ContiguousArrayStorageBase {
62
+ // The class that implements the storage for a ContiguousArray<Element>
63
+ @_versioned
64
+ final class _ContiguousArrayStorage < Element> : _ContiguousArrayStorageBase {
65
+
66
+ deinit {
67
+ _elementPointer. deinitialize ( count: countAndCapacity. count)
68
+ _fixLifetime ( self )
69
+ }
70
+
69
71
#if _runtime(_ObjC)
70
72
/// If the `Element` is bridged verbatim, invoke `body` on an
71
73
/// `UnsafeBufferPointer` to the elements and return the result.
@@ -82,28 +84,7 @@ class _ContiguousArrayStorage1 : _ContiguousArrayStorageBase {
82
84
83
85
/// If `Element` is bridged verbatim, invoke `body` on an
84
86
/// `UnsafeBufferPointer` to the elements.
85
- internal func _withVerbatimBridgedUnsafeBufferImpl(
86
- _ body: ( UnsafeBufferPointer < AnyObject > ) throws -> Void
87
- ) rethrows {
88
- _sanityCheckFailure (
89
- " Must override _withVerbatimBridgedUnsafeBufferImpl in derived classes " )
90
- }
91
- #endif
92
- }
93
-
94
- // The class that implements the storage for a ContiguousArray<Element>
95
- @_versioned
96
- final class _ContiguousArrayStorage < Element> : _ContiguousArrayStorage1 {
97
-
98
- deinit {
99
- _elementPointer. deinitialize ( count: countAndCapacity. count)
100
- _fixLifetime ( self )
101
- }
102
-
103
- #if _runtime(_ObjC)
104
- /// If `Element` is bridged verbatim, invoke `body` on an
105
- /// `UnsafeBufferPointer` to the elements.
106
- internal final override func _withVerbatimBridgedUnsafeBufferImpl(
87
+ internal final func _withVerbatimBridgedUnsafeBufferImpl(
107
88
_ body: ( UnsafeBufferPointer < AnyObject > ) throws -> Void
108
89
) rethrows {
109
90
if _isBridgedVerbatimToObjectiveC ( Element . self) {
0 commit comments