-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
当传入值为null的时候。 使用苦力创建的代码,对应的类型为UnknownType? 此时无法识别类型,报错。
烦请修正
测试JSON
{ "location": null }
产生的代码
struct Photo {
let location: UnknownType?
static func fromJSONDictionary(info: [String: AnyObject]) -> Photo? {
let location = info["location"] as? UnknownType
return Photo(location: location)
}
}
错误提示信息为: Use of undeclared type 'UnknownType'
Metadata
Metadata
Assignees
Labels
No labels