title: how to get value from a function that returns object in kotlin
body: <p>I am using math commons library but it turns out that when I want a function to <strong>return an Double</strong>, the intellij idea automatically corrects it to an object.</p>
  
  <pre><code>import org.apache.commons.math3.distribution.TDistribution
  
  
  // TDistribution  --&gt; It doesn't allow me to change to Double
  fun calculo(a:Double): TDistribution {
  
      val distf = TDistribution(28.0,a)
      return distf
  }
  
  fun main(args: Array&lt;String&gt;){
  
      val ko = calculo(0.95)
      println(ko)
  }
  </code></pre>
  
  <p>return it</p>
  
  <pre><code>org.apache.commons.math3.distribution.TDistribution@404b9385
  </code></pre>