title: Swift @ObservedObject initialize with another property
body: <p><strong>EDIT</strong> added the source code showing declaration of the variables</p>
  <p>I am trying to initialize a view model property which is an @ObservedObject
  <code>@ObservedObject  private var viewmodel : ExpenseListViewModel</code></p>
  <p>I want to initialize the view model with a repostitory which is going to accept the ManagedObjectContext as a parameter in the constructor</p>
  <p>Since viewmodel has a prperty wrapper it is not allowing to create it as a computed property either.</p>
  <p>when i tried to initialize the Repository and viewmodel in the init i get an self is used before being initialized</p>
  <pre><code>struct ContentView: View {
      @Environment(\.managedObjectContext) private var moc
      private (set) var repo: Repository
      @ObservedObject  private var viewmodel : ExpenseListViewModel 
      init() {
          //let repository = CoreDataRepository(Context: moc)
          repo = CoreDataRepository(Context: self.moc)
          self.viewmodel = .init(repository: repo)
      }
      var body: some View {
          Text(viewmodel.Expenses[0].Name ).onAppear(perform: viewmodel.getExpenses )
      }
  }
  </code></pre>