Swifters:
I’m attempting to update some library code to beta 4 and I’ve run into
something that’s either a bug or a deliberate change. In a class that’s a
Foundation.Operation subclass, there are two finish() functions:
final func finish(_ receivedErrors: [Error] = []) {
_finish(receivedErrors, fromCancel: false)
}
/// Convenience method to simplify finishing when there is only one error.
final func finish(_ receivedError: Error?) {
finish(receivedError.map { [$0]} ?? [])
}
Prior to beta 4 these functions lived side by side quite happily. In beta 4,
however, their existence produces this error:
method 'finish' with Objective-C selector 'finish:' conflicts with previous
declaration with the same Objective-C selector
Now, if I mark one of the functions @nonobjc, it compiles. So is this a bug or
change in behavior?
Jon Shier
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users