why is this Swift initializer legal
why is this Swift initializer legal
- Subject: why is this Swift initializer legal
- From: Roland King <email@hidden>
- Date: Sat, 06 Jun 2015 17:43:19 +0800
public class RDKBLEService : NSObject
{
let peripheral : CBPeripheral
public init( peripheral: CBPeripheral )
{
self.peripheral = peripheral
}
}
It’s a designated initialiser, there’s a superclass (NSObject) but the initialiser doesn’t call a designated initialiser of the superclass. According to the rules I was just re-re-re-reading about Swift initialisation, it’s required to call a superclass designated initialiser from your derived class. I was looking to see if I could find an exception to the rule which this fell under but can’t.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden