Have a simple question on Swift. I have a simple base class Base and a child class ABase:
class Base {
var test1:Int
init(forTest test1:Int) {
self.test1 = test1
}
}
class ABase : Base {
var test3:Int
init(forAnother test3:Int) {
**super.init(forTest: test3)**
self.test3 = test3
}
}
I get a compiler error at the super.init(forTest: test3) line in my init call in ABase. The error is:
Property 'self.test3' no initialized at super.init call.
I'm trying to understand why I can't init an object with an uninitialized var in Swift?