title: Android kotlin overriding interface methods inside onCreateView() method
body: <p>I am new to Kotlin. I have an interface containing two method definitions:</p>
  
  <pre><code>fun onSuccess(result: T)
  fun onFailure(e: Exception)
  </code></pre>
  
  <p>Now, in my fragment I have implemented this interface and want to use these methods inside as:</p>
  
  <pre><code>override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?,
                                savedInstanceState: Bundle?): View? {
       ..................
       ..................
       override fun onSuccess(result: String) {}
       override fun onFailure(e: Exception) {}
  }
  </code></pre>
  
  <p>In java we can use with @override but here I am getting the error 'Modifier 'override' is not applicable to local function'. I am working in kotlin for last 2-3 days and I love it. But some time small issues taking some time to debug.</p>