title: Procotol composition on the same property
body: <p>Is there a way to achieve this ?</p>
  
  <pre><code>protocol VCProtocol1: UIViewController {
      var viewModel: VMProtocol1? { get set }
  }
  
  protocol VCProtocol2: UIViewController {
      var viewModel: VMProtocol2? { get set }
  }
  
  class VC: UIViewController, VCProtocol1, VCProtocol2 {
      var viewModel: (VMProtocol1 &amp; VMProtocol2)?
  }
  </code></pre>
  
  <p>What I want to do is composition on ViewController to avoid re-implementing the same code in multiple ViewControllers.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>To be more precise, the problem here is I want my <em>viewModel</em> property to be shared between both protocols because ultimately I want to implement something like this: </p>
  
  <p><strong>- View Model</strong></p>
  
  <pre><code>protocol VMProtocol1 {
      func vmTest1()
  }
  
  protocol VMProtocol2 {
      func vmTest2()
  }
  
  class ViewModel: VMProtocol1, VMProtocol2 {
      func vmTest1() { }
      func vmTest2() { }
  }
  </code></pre>
  
  <p><strong>- View Controller</strong></p>
  
  <pre><code>protocol VCProtocol1: UIViewController {
      var viewModel: VMProtocol1 { get set }
  
      func vcTest1()
  }
  
  extension VCProtocol1 {
      func vcTest1() {
          // This is the key point, I want to be able to refer to my viewModel property internally in each protocol.
          self.viewModel.vmTest1() 
      }
  }
  
  protocol VCProtocol2: UIViewController {
      var viewModel: VMProtocol2 { get set }
  }
  
  class VC: UIViewController, VCProtocol1, VCProtocol2 {
      var viewModel: (VMProtocol1 &amp; VMProtocol2)?
  }
  </code></pre>