title: Kotlin: Interface ... does not have constructors
body: <p>I am converting some of my Java code to Kotlin and I do not quite understand how to instantiate interfaces that are defined in Kotlin code. As an example, I have an interface (defined in Java code):</p>
  
  <pre><code>public interface MyInterface {
      void onLocationMeasured(Location location);
  }
  </code></pre>
  
  <p>And then further in my Kotlin code I instantiate this interface:</p>
  
  <pre><code>val myObj = new MyInterface { Log.d("...", "...") }
  </code></pre>
  
  <p>and it works fine. However, when I convert MyInterface to Kotlin:</p>
  
  <pre><code>interface MyInterface {
      fun onLocationMeasured(location: Location)
  }
  </code></pre>
  
  <p>I get an error message: <code>Interface MyListener does not have constructors</code> when I try to instantiate it - though it seems to me that nothing has changed except syntax. Do I misunderstand how interfaces work in Kotlin?</p>