title: Constructor call in kotlin using vararg
body: <p>Is there any way to call a constructor using varargs without hard coding the array parameter (<code>datain[0]</code>, <code>datain[10]</code>, etc.). For example,</p>
  
  <pre><code>constructor(vararg datain:String): this(datain[0],datain[1],datain[2]){
  }
  </code></pre>
  
  <p>Currently I am calling like this:</p>
  
  <pre><code>public class parent(var var1:String, var var2:String){
  }
  
  public class child(var var3:String, var1:String, var2:String): parent(var1,var2){
      constructor(vararg datain:String): this(datain[0],datain[1],datain[2]){
      }
  }
  </code></pre>