> Am 25.11.2015 um 08:56 schrieb Quincey Morris 
> <quinceymor...@rivergatesoftware.com>:
> 
>> That's explained in "Using Swift with Cocoa and Objective-C":
>> 
>> "The compiler does not automatically insert the @objc attribute for 
>> declarations marked with the private access-level modifier.”
> 
> That can’t be the full explanation, because the other private method doesn’t 
> produce an error, Roland said.

I can't replicate that behavior.

This doesn't work:

// Roland's protocol must be marked @objc since it has optional requirements.

@objc public protocol PublicProtocol {
        func someFunction()
        // ...
}

private class SomeClass: NSObject, PublicProtocol {
        func someFunction() {
                // implementation
        }
}

Type 'SomeClass' does not conform to protocol 'PublicProtocol'
Fix-it: Candidate is not '@objc', but protocol requires it


Andreas
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to