title: How to extend enums in Kotlin?
body: <p>In my Kotlin project, I have a DefaultError enum</p>
  
  <pre><code>enum class DefaultError {
      INTERNET_ERROR,
      BLUETOOTH_ERROR,
      TEMPERATURE_ERROR
  }
  </code></pre>
  
  <p>I would like to extend them so that I have </p>
  
  <pre><code>enum class NfcAndDefaultError : DefaultError {
      //DefaultError inherited plus
      NFC_ERROR
  }
  </code></pre>
  
  <p>and another enum </p>
  
  <pre><code>enum class KameraAndDefaultError : DefaultError {
      //DefaultError inherited plus
      CAM_ERROR
  }
  </code></pre>
  
  <p>Now, I have </p>
  
  <pre><code>enum class NfcDefaultError {
      INTERNET_ERROR,
      BLUETOOTH_ERROR,
      TEMPERATURE_ERROR,
      NFC_ERROR
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>enum class KameraAndDefaultError {
      INTERNET_ERROR,
      BLUETOOTH_ERROR,
      TEMPERATURE_ERROR,,
      CAM_ERROR
  }
  </code></pre>
  
  <p><strong>I bet Kotlin has a nice way there?</strong></p>