Skip to content

Commit

Permalink
Remove dummy Void args working around fixed typechecker bug – ABI FIXME
Browse files Browse the repository at this point in the history
  • Loading branch information
airspeedswift committed Oct 12, 2016
1 parent e5f7ef9 commit d34f3ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions stdlib/public/core/ContiguousArrayBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,11 @@ internal final class _EmptyArrayStorage
return try body(UnsafeBufferPointer(start: nil, count: 0))
}

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

override func _getNonVerbatimBridgedHeapBuffer(
_ dummy: Void
) -> _HeapBuffer<Int, AnyObject> {
override func _getNonVerbatimBridgedHeapBuffer() -> _HeapBuffer<Int, AnyObject> {
return _HeapBuffer<Int, AnyObject>(
_HeapBufferStorage<Int, AnyObject>.self, 0, 0)
}
Expand Down Expand Up @@ -122,7 +118,7 @@ final class _ContiguousArrayStorage<Element> : _ContiguousArrayStorage1 {
/// Returns the number of elements in the array.
///
/// - Precondition: `Element` is bridged non-verbatim.
override internal func _getNonVerbatimBridgedCount(_ dummy: Void) -> Int {
override internal func _getNonVerbatimBridgedCount() -> Int {
_sanityCheck(
!_isBridgedVerbatimToObjectiveC(Element.self),
"Verbatim bridging should be handled separately")
Expand All @@ -132,7 +128,7 @@ final class _ContiguousArrayStorage<Element> : _ContiguousArrayStorage1 {
/// Bridge array elements and return a new buffer that owns them.
///
/// - Precondition: `Element` is bridged non-verbatim.
override internal func _getNonVerbatimBridgedHeapBuffer(_ dummy: Void) ->
override internal func _getNonVerbatimBridgedHeapBuffer() ->
_HeapBuffer<Int, AnyObject> {
_sanityCheck(
!_isBridgedVerbatimToObjectiveC(Element.self),
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/core/SwiftNativeNSArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ internal class _ContiguousArrayStorageBase
"Concrete subclasses must implement _withVerbatimBridgedUnsafeBuffer")
}

internal func _getNonVerbatimBridgedCount(_ dummy: Void) -> Int {
internal func _getNonVerbatimBridgedCount() -> Int {
_sanityCheckFailure(
"Concrete subclasses must implement _getNonVerbatimBridgedCount")
}

internal func _getNonVerbatimBridgedHeapBuffer(_ dummy: Void) ->
internal func _getNonVerbatimBridgedHeapBuffer() ->
_HeapBuffer<Int, AnyObject> {
_sanityCheckFailure(
"Concrete subclasses must implement _getNonVerbatimBridgedHeapBuffer")
Expand Down

0 comments on commit d34f3ee

Please sign in to comment.