title: What's the correct syntax for overriding an interface member function with a visibility modifier?
body: <p>Neither of the two pages, the one on <a href="https://kotlinlang.org/docs/reference/interfaces.html" rel="nofollow">Interfaces</a>, nor the one on <a href="https://kotlinlang.org/docs/reference/visibility-modifiers.html" rel="nofollow">Visibility Modifiers</a> provides an example of the syntax I am after, so I ask.</p>
  
  <p>I have an interface like so:</p>
  
  <pre><code>package bookyard.contracts;
  
  public interface IAuthenticationManager&lt;T&gt; {
      fun authenticateUser(userName: String, password : String,
                              appId: String, appSecret : String) : OperationResult&lt;T&gt;;
  }
  </code></pre>
  
  <p>And I am writing an implementation for it but neither of the three below listed syntaxes work. Each time, the compiler reports the following error:</p>
  
  <blockquote>
    <ol>
    <li><p>'authenticateUser' overrides nothing</p></li>
    <li><p>Class 'DatabaseAuthenticationManager' must be declared abstract or implement abstract member public abstract fun authenticateUser(userName: String, password: String, appId: String, appSecret: String): OperationResult defined in bookyard.contracts.IAuthenticationManager</p></li>
    </ol>
  </blockquote>
  
  <pre><code>package bookyard.server.util
  
  import bookyard.contracts.IAuthenticationManager;
  
  public class DatabaseAuthenticationManager :  IAuthenticationManager&lt;User&gt; {
  
      /* override public fun authenticateUser(userName : String?,
                                  password : String?,
                                  appId : String?,
                                  appSecret : String?) : OperationResult&lt;User&gt; {
      }
  
      public override fun authenticateUser(userName : String?,
                                  password : String?,
                                  appId : String?,
                                  appSecret : String?) : OperationResult&lt;User&gt; {
      }
  
      public fun authenticateUser(userName : String?,
                                  password : String?,
                                  appId : String?,
                                  appSecret : String?) : OperationResult&lt;User&gt; {
      } */
  }
  </code></pre>