Skip to content

Commit 1f1d4cd

Browse files
sibljonmatthewcheok
authored andcommitted
Explicitly coerce to Any (eliminate Swift 3.0.1 compiler warning) (#57)
1 parent c7e27b9 commit 1f1d4cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

JSONCodable/JSONDecodable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public class JSONDecoder {
139139

140140
// JSONCompatible?
141141
public func decode<Compatible: JSONCompatible>(_ key: String) throws -> Compatible? {
142-
return (get(key) ?? object[key]) as? Compatible
142+
return (get(key) ?? object[key] as Any) as? Compatible
143143
}
144144

145145
// JSONDecodable

0 commit comments

Comments
 (0)