title: How to overload constructors in kotlin differs in lambda return type
body: <p>I have two constructors which are different only in their lambda return type. Is there any option how to overload them? I was trying to use <strong>JvmOverloads</strong> annotation, but it didn't work.</p>
  
  <pre><code>constructor(db : Database, handler: ( transaction: Transaction) -&gt; Unit) : this(db, Handler&lt;Transaction&gt;( {handler.invoke(it)}))
  
  @JvmOverloads
  constructor(db : Database, handler: ( transaction: Transaction) -&gt; Any) : this(db, Handler&lt;Transaction&gt;( {handler.invoke(it)}))
  </code></pre>