Skip to content

Commit d34f3ee

Browse files
committed
Remove dummy Void args working around fixed typechecker bug – ABI FIXME swiftlang#26
1 parent e5f7ef9 commit d34f3ee

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

stdlib/public/core/ContiguousArrayBuffer.swift

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,11 @@ internal final class _EmptyArrayStorage
3232
return try body(UnsafeBufferPointer(start: nil, count: 0))
3333
}
3434

35-
// FIXME(ABI)#26 (Type Checker): remove 'Void' arguments here and elsewhere in this file, they
36-
// are a workaround for an old compiler limitation.
37-
override func _getNonVerbatimBridgedCount(_ dummy: Void) -> Int {
35+
override func _getNonVerbatimBridgedCount() -> Int {
3836
return 0
3937
}
4038

41-
override func _getNonVerbatimBridgedHeapBuffer(
42-
_ dummy: Void
43-
) -> _HeapBuffer<Int, AnyObject> {
39+
override func _getNonVerbatimBridgedHeapBuffer() -> _HeapBuffer<Int, AnyObject> {
4440
return _HeapBuffer<Int, AnyObject>(
4541
_HeapBufferStorage<Int, AnyObject>.self, 0, 0)
4642
}
@@ -122,7 +118,7 @@ final class _ContiguousArrayStorage<Element> : _ContiguousArrayStorage1 {
122118
/// Returns the number of elements in the array.
123119
///
124120
/// - Precondition: `Element` is bridged non-verbatim.
125-
override internal func _getNonVerbatimBridgedCount(_ dummy: Void) -> Int {
121+
override internal func _getNonVerbatimBridgedCount() -> Int {
126122
_sanityCheck(
127123
!_isBridgedVerbatimToObjectiveC(Element.self),
128124
"Verbatim bridging should be handled separately")
@@ -132,7 +128,7 @@ final class _ContiguousArrayStorage<Element> : _ContiguousArrayStorage1 {
132128
/// Bridge array elements and return a new buffer that owns them.
133129
///
134130
/// - Precondition: `Element` is bridged non-verbatim.
135-
override internal func _getNonVerbatimBridgedHeapBuffer(_ dummy: Void) ->
131+
override internal func _getNonVerbatimBridgedHeapBuffer() ->
136132
_HeapBuffer<Int, AnyObject> {
137133
_sanityCheck(
138134
!_isBridgedVerbatimToObjectiveC(Element.self),

stdlib/public/core/SwiftNativeNSArray.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,12 @@ internal class _ContiguousArrayStorageBase
259259
"Concrete subclasses must implement _withVerbatimBridgedUnsafeBuffer")
260260
}
261261

262-
internal func _getNonVerbatimBridgedCount(_ dummy: Void) -> Int {
262+
internal func _getNonVerbatimBridgedCount() -> Int {
263263
_sanityCheckFailure(
264264
"Concrete subclasses must implement _getNonVerbatimBridgedCount")
265265
}
266266

267-
internal func _getNonVerbatimBridgedHeapBuffer(_ dummy: Void) ->
267+
internal func _getNonVerbatimBridgedHeapBuffer() ->
268268
_HeapBuffer<Int, AnyObject> {
269269
_sanityCheckFailure(
270270
"Concrete subclasses must implement _getNonVerbatimBridgedHeapBuffer")

0 commit comments

Comments
 (0)