Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambigous Error in Swift 1.2 #14

Closed
codetalks-new opened this issue Feb 25, 2015 · 3 comments
Closed

Ambigous Error in Swift 1.2 #14

codetalks-new opened this issue Feb 25, 2015 · 3 comments

Comments

@codetalks-new
Copy link

在 Swift 1.2中下面两个方法的签名是等价的:

   public func responseSwiftyJSON(completionHandler: (NSURLRequest, NSHTTPURLResponse?, JSON, NSError?) -> Void) -> Self 
// VS
    public func responseSwiftyJSON(queue: dispatch_queue_t? = nil, options: NSJSONReadingOptions = .AllowFragments, completionHandler: (NSURLRequest, NSHTTPURLResponse?, JSON, NSError?) -> Void) -> Self 
@analleraP
Copy link

I have the same problem @banxi1988 , You found a solution?

@mdziadkowiec
Copy link

I changed the name of the second function to: responseSwiftyJSONWithQueue and it is working now.

It seems that Swift 1.2 no longer support the same functions names (and return types) with diffrerent parameters types.

Check this out: https://developer.apple.com/swift/blog/?id=20
(Section: Redefinition or Overload?)

@wongzigii
Copy link
Member

Closing for inactive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants