-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from utahiosmac/migration-hints
Added @available attributes to assist with Swift 3 migration.
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// | ||
// M A R S H A L | ||
// | ||
// () | ||
// /\ | ||
// ()--' '--() | ||
// `. .' | ||
// / .. \ | ||
// ()' '() | ||
// | ||
// | ||
|
||
|
||
extension MarshaledObject { | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: ValueType>(_ key:KeyType) throws -> A { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: ValueType>(_ key:KeyType) throws -> A? { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: ValueType>(_ key:KeyType) throws -> [A] { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: ValueType>(_ key:KeyType) throws -> [A]? { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: ValueType>(_ key: KeyType) throws -> Set<A> { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: ValueType>(_ key: KeyType) throws -> Set<A>? { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: RawRepresentable>(_ key: KeyType) throws -> A where A.RawValue: ValueType { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: RawRepresentable>(for key: KeyType) throws -> A? where A.RawValue: ValueType { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: RawRepresentable>(_ key: KeyType) throws -> [A] where A.RawValue: ValueType { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: RawRepresentable>(_ key: KeyType) throws -> [A]? where A.RawValue: ValueType { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: RawRepresentable>(_ key: KeyType) throws -> Set<A> where A.RawValue: ValueType { | ||
return try value(for: key) | ||
} | ||
|
||
@available(*, unavailable, renamed: "value(for:)") | ||
public func valueForKey<A: RawRepresentable>(_ key: KeyType) throws -> Set<A>? where A.RawValue: ValueType { | ||
return try value(for: key) | ||
} | ||
} |