title: "Property must be initialized or be abstract" in init block when throwing an exception
body: <p>Why does kotlin report <code>Property must be initialized or be abstract</code>. The object construction is never finished, so it should not matter whether <code>a</code> is initialized or not. Could a case be demonstrated where this would be a problem?  </p>
  
  <pre><code>class Foo {
      private val a: Int
  
      init {
          a = 42
          throw Exception()
      }
  }
  
  fun main() {
      Foo()
  }
  </code></pre>
  
  <p><a href="https://pl.kotl.in/svJbpfD6A" rel="nofollow noreferrer">kotlin playground</a></p>
  
  <hr>
  
  <p>However these work just fine  </p>
  
  <pre><code>fun bar() {
      throw Exception()
  }
  
  class Foo {
      private val a: Int
  
      init {
          a = 42
          bar()
      }
  }
  
  fun main() {
      Foo()
  }
  </code></pre>
  
  <p><a href="https://pl.kotl.in/sC6MP3Xq8" rel="nofollow noreferrer">kotlin playground</a></p>
  
  <pre><code>class Foo {
      private val a: Int = throw Exception()
  }
  
  fun main() {
      Foo()
  }
  </code></pre>
  
  <p><a href="https://pl.kotl.in/RLBeoEZjX" rel="nofollow noreferrer">kotlin playground</a></p>
  
  <hr>
  
  <p>Similar java code works as expected:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class Test {
      private static class Foo {
          private final int a;
  
          public Foo() throws Exception {
              a = 42;
              throw new Exception();
          }
      }
  
       public static void main(String []args) throws Exception {
           new Foo();
       }
  }
  
  </code></pre>