title: How to instantiate a new instance of generic type
body: <p>In C# you can place a new constraint on a generic to create a new instance of the generic parameter type, is there an equivalent in Kotlin?  </p>
  
  <p>Right now my work around is this:</p>
  
  <pre><code>fun &lt;T&gt; someMethod(class : () -&gt; T) {
      val newInstance = class()
  }
  </code></pre>
  
  <p>and I'm calling someMethod() like this</p>
  
  <pre><code>someMethod&lt;MyClass&gt;(::MyClass)
  </code></pre>
  
  <p>but I would like to do something like this:</p>
  
  <pre><code>fun &lt;T : new&gt; someMethod() {
      val newInstance = T()
  }
  </code></pre>
  
  <p>Is that possible?</p>