I\'m trying to update my project to Swift 3.0 but I have some difficulties. I\'m getting next error: \"Escaping closures can only capture inout parameters explicitly by valu
If you are sure that your variable will be available the whole time just use a true Pointer (same what inout actually does)
inout
func foo(val: UnsafeMutablePointer, completion: @escaping (NSDictionary) -> Void) { val.pointee = NSDictionary() DispatchQueue.main.async { completion(val.pointee) } }