title: Kotlin variable initialization for child class behaves weird for initializing variable with value 0
body: <p>I have created the following class hierarchy:</p>
  
  <pre><code>open class A {
      init {
          f()
      }
  
      open fun f() {
          println("In A f")
      }
  }
  
  class B : A() {
      var x: Int = 33
  
      init {
          println("x: " + x)
      }
  
      override fun f() {
          x = 1
          println("x in f: "+ x)
      }
  
      init {
          println("x2: " + x)
      }
  }
  
  fun main() {
      println("Hello World!!")
      val b = B()
      println("in main x : " + b.x)
  }
  </code></pre>
  
  <p>The output of this code is</p>
  
  <pre class="lang-none prettyprint-override"><code>Hello World!!
  x in f: 1
  x: 33
  x2: 33
  in main x : 33
  </code></pre>
  
  <p><strong>But</strong> if I change the initialization of <code>x</code> from</p>
  
  <pre><code>var x: Int = 33
  </code></pre>
  
  <p>to</p>
  
  <pre><code>var x: Int = 0
  </code></pre>
  
  <p>the output shows the invocation of the method in contrast to the output above:</p>
  
  <pre class="lang-none prettyprint-override"><code>Hello World!!
  x in f: 1
  x: 1
  x2: 1
  in main x : 1
  </code></pre>
  
  <p>Does anyone know why the initialization with <code>0</code> causes a different behaviour than the one with another value?</p>