title: Kotlin Decompiler generates erroneous code - Is it possible to prevent?
body: <pre><code>class CheckInventory(target: Target) : Command(target) {
  
  }
  </code></pre>
  <p>When decompiling the above Kotlin code using the IntelliJ's &quot;<em>Show Kotlin bytecode</em>&quot; option, it keeps generating a statement above the <code>super()</code> call:</p>
  <pre><code>class CheckInventory extends Command {
      public CheckInventory(Target target) {
          Intrinsic.checkParameterIsNotNull(target, &quot;target&quot;);
          super(target); //error, must be first call
      }
  }
  </code></pre>
  <p>There are a few other issues, such as generating top-level classes with an access modifier for WhenMapping:</p>
  <pre><code>public class MyClass {
  
  }
  
  public final class MyClass$WhenMappings { //error, shouldn't be public
  
  }
  </code></pre>
  <p>I checked for both Kotlin and IntelliJ updates, and I'm using the latest version for both.</p>
  <p>At first I thought it may had to do with poorly written Kotlin code, but even the simplest code files seem to require some sort of check/generation that's illegal in Java.</p>
  <h1>Question</h1>
  <p>Is there any way to ensure the decompilation process stays within bounds of the Java language rules?</p>