title: Kotlin: Enum companion function
body: <p>I am trying to extend the Enum companion object with a simple function as follows:</p>
  
  <pre><code>fun Enum.Companion.myFun() = 1
  </code></pre>
  
  <p>However when I try to call it on an Enum <code>State</code>, it is unknown to Kotlin.</p>
  
  <pre><code>State.myFun()
  </code></pre>
  
  <p>I can see it works for <code>Enum.myFun()</code>, but that is not what I need.</p>