2
으로 사용할 수 없습니다. 내 코드베이스를 Swift 3.0으로 업데이트하면 마이 그 레이션 할 때 생성되는 오류를 해결하는 방법을 알 수 없습니다 : "컨텍스트 유형 'AnyObject'는 사전 리터럴과 함께 사용하십시오. " 어떤 도움이라도 대단히 감사하겠습니다.Swift 3.0으로 업데이트 : 'AnyObject'문구 유형은 사전 리터럴
typealias JSONDictionary = Dictionary<String, AnyObject>
func infoDict() -> JSONDictionary {
return ["users" :
//the following line generates the error "Contextual type 'AnyObject' cannot be used with dictionary literal"
["add" : Array(self.addUserIDs), "del" : Array(self.removeUserIDs)],
"groups" :
["add" : Array(self.addCircleIDs), "del" : Array(self.removeCircleIDs)],
"friends" : friends,
"type" : 1
]
}