title: Type deduction fails for array of enum interface
body: <p>In the following minimal example <code>useFoos(a)</code> is totally fine, but <code>useFoos(b)</code> gives a <a href="https://pl.kotl.in/giVZShSta" rel="nofollow noreferrer">compiler error</a>.</p>
  
  <pre class="lang-kotlin prettyprint-override"><code>interface FooInterface
  
  fun useFoos(foos: Array&lt;FooInterface&gt;) {}
  
  enum class FooEnum : FooInterface
  
  fun main() {
      val a = FooEnum.values()
      useFoos(a as Array&lt;FooInterface&gt;)
      useFoos(a)
  
      val b = FooEnum.values()
      useFoos(b) // Error: Type mismatch: inferred type is Array&lt;FooEnum&gt; but Array&lt;FooInterface&gt; was expected
      useFoos(b as Array&lt;FooInterface&gt;)
  }
  </code></pre>
  
  <p>And idea why this is? And if it's not a compiler bug, but intended behavior instead, could somebody point me to the place where this behavior is specified/explained?</p>