In XCode 6.2, I have a Swift project where a main-object ("Backbone") creates sub-objects with pointers back to Backbone:
class Backbone
{
let logManager: QCLogManager!
let cloudJobManager: CloudJobManager!
...
init() {
logManager = QCLogManager(backbone: self)
cloudJobManager = CloudJobManager(backbone: self)
...
}
It works very nicely. However, in XCode 6.3 each line in init()
now gives the error:
'self' used before all stored properties are initialized.
That seems a rather unhelpful compiler restriction. Why did it change? How should I now be doing it?