title: Kotlin overriding supertype variables
body: <p>Consider two classes:</p>
  
  <pre><code>abstract class ParentRepository {}
  
  class ChildRepository : ParentRepository {}
  
  abstract class ParentClass {
      protected abstract var repository: ParentRepository
  }
  
  class ChildClass : ParentClass {
      override var repository: ChildRepository
  }
  </code></pre>
  
  <p>The last part won't work:</p>
  
  <pre><code>override var repository: ChildRepository
  </code></pre>
  
  <p>It will complain: </p>
  
  <pre><code>Type of 'repository' doesn't match the type of the overridden var-property 'protected abstract var repository: ParentRepository
  </code></pre>
  
  <p>I understand the problem, but I don't see the reason why this shouldn't work – ChildRepository is an instance of ParentRepository and this is a common thing I am used to from Java.</p>