http://stackoverflow.com/questions/25458548/swift-ambiguous-use-of-operator
|
I have just downloaded Xcode6-beta6. I am getting compiler error "ambiguous use of operator '>'" for following codes
It was working before in Xcode6-beta5. The code is from apple swift documentationhttps://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Closures.html#//apple_ref/doc/uid/TP40014097-CH11-XID_152 Any ideas? |
|||||||||||||||||
add a comment
|
|
I had the same issue also with
and
Apparently XCode can't correctly infer the correct type "String" for the parameters, thus creating an ambiguity on the operator. My solution has been to explicitly declare the type at least one of them which also makes the code more readable. Like in:
|
||||
|
add a comment
|
|
This seems to be a bug in the Foundation framework's bridging. It declares overrides of
|
|||
|
add a comment
|
namesdefined as? – Mike S Aug 23 '14 at 4:51