title: Why can't I access a superclass' enum in Kotlin?
body: <p>I am converting a Java Android project to Kotlin.</p>
  <p>I am using <a href="https://github.com/api-ai/apiai-android-client" rel="nofollow noreferrer">API.AI's client</a>, which has two <code>AIConfiguration</code> classes:</p>
  <p><em>Superclass</em></p>
  <pre><code>package ai.api;
  public class AIConfiguration implements Cloneable {
       public static enum SupportedLanguages {
           English(&quot;en&quot;),
           //...
       }
           //...
  }
  </code></pre>
  <p><em>Subclass</em></p>
  <pre><code>package ai.api.android;
  public class AIConfiguration extends ai.api.AIConfiguration {
      public enum RecognitionEngine {
      //...
  }
  </code></pre>
  <p>In my Java code, I was creating an instance of the subclass, as recommended in the api guide:</p>
  <pre><code>final AIConfiguration config = new AIConfiguration(&quot;TOKEN&quot;,
          AIConfiguration.SupportedLanguages.English,
          AIConfiguration.RecognitionEngine.System);
  </code></pre>
  <p>Once converted to Kotlin, it looks like this:</p>
  <pre><code>val config = AIConfiguration(&quot;TOKEN&quot;,
          AIConfiguration.SupportedLanguages.English,
          AIConfiguration.RecognitionEngine.System)
  </code></pre>
  <p>...which causes an <strong><code>Unresolved reference: SupportedLanguages</code></strong>.</p>
  <ul>
  <li>I can update the reference to <code>ai.api.AIConfiguration.SupportedLanguages.English</code>, which compiles successfully.</li>
  <li>I could import the superclass with <code>import ai.api.AIConfiguration as SuperAIConfiguration</code> and use <code>SuperAIConfiguration.SupportedLanguages</code>, but I would rather reference the enum directly on the subclass.</li>
  </ul>
  <p>I don't get it: <strong>why is this reference valid in Java but not in Kotlin?</strong></p>