title: How to Pass vararg to a varag function or constructor in Kotlin?
body: <p>Kotlin does not allow my subclass to pass vararg to my super class constuctor
  Here is my Operation class:</p>
  
  <pre><code>package br.com.xp.operation
  
  import java.util.ArrayList
  
  abstract class Operation(vararg values: Value) : Value {
      protected var values: MutableList&lt;Value&gt; = ArrayList()
  
      internal abstract val operator: String
  }
  </code></pre>
  
  <p>and here is my SubtractionOperation class:</p>
  
  <pre><code>package br.com.xp.operation
  
  class SubtractionOperation private constructor(vararg values: Value) : Operation(values) {
      override val operator: String
          get() = "-"
  }
  </code></pre>
  
  <p>The compile says: </p>
  
  <blockquote>
    <p>Type mismatch Required Value found Array</p>
  </blockquote>
  
  <p>Can anyone explain why this is not possible?</p>