> On Sep 6, 2015, at 3:19 PM, Quincey Morris
> <[email protected]> wrote:
>
> (But merely defining a protocol for each of your subclasses is not an
> improvement here.)
It does, however, seem to avoid the crash:
class ObjectBase<T> {
required init() {}
}
protocol MyProtocol {
func foo()
func bar()
func baz()
}
class MyObject: ObjectBase<MyProtocol>, MyProtocol {
func foo() { print("foo") }
func bar() { print("bar") }
func baz() { print("baz") }
required init() {}
}
let obj = MyObject()
compiles and runs without errors.
Charles
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]