Skip to content

Id as any stdlib spot fixes #3803

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 2 commits into from
Jul 28, 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
6 changes: 3 additions & 3 deletions stdlib/public/SDK/CoreImage/CoreImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extension CIFilter {
// arguments args: [AnyObject]?,
// options dict: Dictionary<NSObject, AnyObject>?) -> CIImage?
func apply(_ k: CIKernel, args: [AnyObject], options: (String, AnyObject)...) -> CIImage? {
var dict: [String : AnyObject] = [:]
var dict = [String : AnyObject](minimumCapacity: options.count)
for (key, value) in options {
dict[key] = value
}
Expand All @@ -38,7 +38,7 @@ extension CIFilter {
convenience init?(
name: String, elements: (String, AnyObject)...
) {
var dict: [String : AnyObject] = [:]
var dict = [String : AnyObject](minimumCapacity: elements.count)
for (key, value) in elements {
dict[key] = value
}
Expand All @@ -50,7 +50,7 @@ extension CIFilter {
extension CISampler {
// - (id)initWithImage:(CIImage *)im keysAndValues:key0, ...;
convenience init(im: CIImage, elements: (String, Any)...) {
var dict: [AnyHashable : Any] = [:]
var dict = [AnyHashable : Any](minimumCapacity: elements.count)
for (key, value) in elements {
dict[key] = value
}
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/SDK/Foundation/NSError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public protocol _BridgedStoredNSError :
/// TODO: Better way to do this?
internal func _stringDictToAnyHashableDict(_ input: [String : Any])
-> [AnyHashable : Any] {
var result: [AnyHashable : Any] = [:]
var result = [AnyHashable : Any](minimumCapacity: input.count)
for (k, v) in input {
result[k] = v
}
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/core/BridgeObjectiveC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public protocol _ObjectiveCBridgeable {
-> Self
}

// TODO: stub for unit testing purposes
// FIXME(ABI): stub for unit testing purposes
extension _ObjectiveCBridgeable {
public static func _isBridgedToObjectiveC() -> Bool {
return true
Expand Down