title: Failure to pass lambda expression in place of a single-method interface. Why?
body: <p>From my understanding, if a Kotlin method requires one argument and that argument is an interface with a single method, I can pass in a lambda expression instead (as illustrated by numerous online tutorials using <code>setOnClickListener</code> and stuff like that). However, compiling the following code:</p>
  
  <pre><code>interface I {
      fun ha()
  }
  
  class C() {
      fun set(i: I) { i.ha() }
  }
  
  fun main(args: Array&lt;String&gt;) {
      val c = C()
      c.set { println("Hi") }
  }
  </code></pre>
  
  <p>results in: <code>error: type mismatch: inferred type is () -&gt; Unit but I was expected</code>.</p>
  
  <p>Did I missing something?</p>