Mixed initialization
Closed this issue · 0 comments
vihanb commented
Mixed initializations currently don't call default initializers meaning something like this results in an uninitialized a
field and therefore a segfault:
public class T {
public let a = "A"
public let b: String
public init(b: String) {
self.b = b
}
}
func main() {
let x = T(b: "B")
print(x.b) // "B"
print(x.a) // segfault
}