title: Swift: Getting "ambiguous expression" when try to pass tuple to callback function
body: <p>I have this class for authenticating a user against my backend.</p>
  
  <pre><code>class BackendService {
  
  
  class func performLogin(#email: String, password: String, success:((res: NSHTTPURLResponse, json: JSON, statusCode: HTTPStatus))-&gt;(), failure: (NSError)-&gt;()) {
  
      let loginURL = baseURL + "/login"
      let parameters = ["email": email, "password": password]
  
      Alamofire.request(.POST, loginURL, parameters: parameters).responseJSON { (req, res, json, err) in
  
          if(err != nil) {
              let response = (error: err!)
              failure(response)
          }
          else {
  
  
              if let httpStatus = HTTPStatus(rawValue: res!.statusCode) {
                  let response = (res: res, json: JSON(json!) , statusCode: httpStatus)
                  success(response)
              }
          }
      }
  
  }
  </code></pre>
  
  <p>In <code>success(response)</code> I am getting <code>Type of expression is ambiguous without more context</code>. Any ideas? </p>
  
  <p>Is there a better, more Swifty way, to write this class?</p>