I would definitely expect these two to conflict, so if they previously compiled happily I would guess that’s a bug we fixed. The most likely possibility is that we didn’t allow making arrays of errors and now we do.
Jordan > On Aug 5, 2016, at 14:57, Jon Shier via swift-users <swift-users@swift.org> > wrote: > > 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
_______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users