title: Cannot use mutating member on immutable value of type
body: <p>I have following struct:</p>
  
  <pre><code>public protocol SuperModel {
      // empty protocol
  }
  struct ModelOne: SuperModel {
      struct SubModelOne {
          var someVar: Double
          var othervar: Double?
      }
      var sub: SubModelOne?
      mutating func setSub(sub: SubModelOne) {          
          self.sub = sub
      }
  }
  </code></pre>
  
  <p>In my class, I want to use this struct like that:</p>
  
  <pre><code>final class SomeClass: SuperClass {
      var data: SuperModel
      init() {
          self.data = ModelOne()
      }
      func someFunc() {
          (self.data as! ModelOne).setSub(ModelOne.SubModelOne(someVar: 2, otherVar: 1))
      }
  }
  </code></pre>
  
  <p>I get following error: <code>Cannot use mutating member on immutable value of type 'ModelOne'</code>. Why is that so and how can I fix this?</p>