title: Nested Interface alternative in Kotlin
body: <p>Okay I have an interface which has few interfaces in it and the code looks like this in Kotlin </p>
  
  <pre><code>interface IStreamRepository : IBaseRepository {
  
  interface OnAddStreamCallback {
      fun onSuccess()
      fun onError(message: String)
  }
  
  interface OnGetAllStreamsCallback {
      fun onSuccess(streams: ArrayList&lt;Stream&gt;)
      fun onError(message: String)
  }
  
  interface OnGetStreamByNameCallback {
      fun onSuccess(stream: Stream)
      fun onError(message: String)
  }
  
  interface OnDeleteStreamCallback {
      fun onSuccess()
      fun onError(message: String)
  }
  }
  </code></pre>
  
  <p>and when I try to do </p>
  
  <pre><code>getAllStreamsCallBack = IStreamRepository.OnGetAllStreamsCallback() {
      //and override methods in OnGetAllStreamsCallback interface 
  }
  </code></pre>
  
  <p>the compiler throws the following error <code>OnGetAllStreamsCallback does not have constructors</code>, How can I solve this issue?</p>