Code Block class A { init(_ p: String) {...} } struct B { var a : A init(_ p: String) { self.a = A(p) } }
This fails to compile because it claims that a is being used before being initialized. I can't do it in the var a : A declaration line because I need to use the initialization argument. I can't make a optional because its actually an ObservableObject and I need to use the self.$a.keypathhere syntax on it which clashes badly with it being optional (plus a isn't really optional, its just this annoying initialization problem).
How to solve this dilemma?