title: How to let a data class implements Interface / extends Superclass properties in Kotlin?
body: <p>I have several data classes which include a <code>var id: Int?</code> field. I want to express this in an <em>interface</em> or <em>superclass</em>, and have data classes extending that and setting this <code>id</code> when they are constructed. However, if I try this:</p>
  
  <pre><code>interface B {
    var id: Int?
  }
  
  data class A(var id: Int) : B(id)
  </code></pre>
  
  <p>It complains I'm overriding the <code>id</code> field, which I am haha..</p>
  
  <p><strong>Q</strong>: How can I let the data class <code>A</code> in this case to take an <code>id</code> when it's constructed, and set that <code>id</code> declared in the <em>interface</em> or <em>superclass</em>?</p>