title: Return an Array<out String>? in Kotlin
body: <p>I'm trying to read a list of string from a file, which is structured as a list:</p>
  
  <pre><code>ElemA
  ElemB
  ElemC
  </code></pre>
  
  <p>I need to save into this variable, which is defined as:</p>
  
  <pre><code>private var history: Array&lt;out String&gt;?
  </code></pre>
  
  <p>I made this method, but it doesn't works because it requires an <strong>Array?</strong> as output, but it founds an Array&lt;(out) Any!>! </p>
  
  <pre><code>private fun loadHistory(): Array&lt;out String&gt;? {
      val list = ArrayList&lt;String&gt;()
      File("history").forEachLine { list.add(it) }
      return list.toArray()
  }
  </code></pre>
  
  <p>How can I solve?</p>