gregschlom
07/01/2016, 5:37 PMclass Foo {
var a: Int
init {
a = 1
}
}
This doesn't compile (Error: property must be initialized)
class Foo {
var a: Int
set(value) {
a = value
}
init {
a = 1
}
}
But this compiles fine
class Foo {
var a: Int
set(value) {
a = value
}
constructor()
init {
a = 1
}
}