Skip to content

Remove dummy Void args working around fixed typechecker bug – ABI FIX… #5245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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