title: Why do I get an "inherited platform declaration clash" error in a derived class?
body: <p>Having an interface (defined from a dependent SDK and cannot making change, the BaseDelegate is from the sdk as well) and a base class:</p>
  
  <pre><code>interface ViewDelegate {
  
      fun getDataType() : String
      fun getItemViewType() : Int
  
      fun onCreateViewHolder(parent: ViewGroup): RecyclerView.ViewHolder
      fun onBindViewHolder(holder: RecyclerView.ViewHolder, item: Data, position: Int)
  
      fun getClickHandler() : View.OnClickListener
      fun setClickHandler(clickHanlder: View.OnClickListener)
  }
  
  open class BaseDelegate(@JvmField var clickHandler: View.OnClickListener) : ViewDelegate {
  
      @JvmField var layoutId = R.layout.base_view
  
      override fun getClickHandler(): View.OnClickListener {
          return clickHandler
      }
  
      override fun setClickHandler(clickHanlder: View.OnClickListener) {
          clickHandler = clickHanlder
      }
  
      override fun getDataType(): String {
          return "Base_TYPE"
      }
  
      override fun getItemViewType(): Int {
          return 1000
      }
  
      override fun onCreateViewHolder(parent: ViewGroup): RecyclerView.ViewHolder {
          return BaseViewHolder(parent.inflate(layoutId, false), clickHandler)
      }
  
      override fun onBindViewHolder(holder: RecyclerView.ViewHolder, item: IData, position: Int) {
          (holder as? BaseViewHolder)?.bindView(item, position)
      }
  }
  </code></pre>
  
  <p>It is fine.</p>
  
  <p>But if making a derived class from the base one, it gets error</p>
  
  <pre><code>class DerivedViewDelegate(clickHandler: View.OnClickListener) : BaseDelegate(clickHandler){
  
      init {
          layoutId = R.layout.child_view
      }
  
      override fun onCreateViewHolder(parent: ViewGroup): RecyclerView.ViewHolder {
          val vw = LayoutInflater.from(parent.getContext()).inflate(layoutId, parent, false)
          return ChildViewHolder(vw, clickHandler)
      }
      override fun onBindViewHolder(holder: RecyclerView.ViewHolder, item: Data, position: Int) {
          (holder as? ChildViewHolder)?.bindView(item, position)
      }
  }
  </code></pre>
  
  <p>The error says:</p>
  
  <pre><code>inherited platform declaration clash: The following declarations have same JVM signature (getClickHandler()Landroid/view$OnClickListner;)  fun &lt;get-clickHandler&gt;(): View.OnClickListener defined in DerivedViewDelegate fun getClickHandler(): View.OnClickListener defined in DerivedViewDelegate
  
  inherited platform declaration clash: The following declarations have same JVM signature (setClickHandler(Landroid/view$OnClickListner;)V)  fun &lt;set-clickHandler&gt;(&lt;set-?&gt;: View.OnClickListener): Unit  defined in DerivedViewDelegate fun setClickHandler(clickHandler: View.OnClickListener): Unit defined in DerivedViewDelegate
  </code></pre>
  
  <p>In Java it is fine:</p>
  
  <pre><code>class DerivedViewDelegate extends BaseDelegate {
  
      public DerivedViewDelegate(View.OnClickListener clickHandler) {
              super(clickHandler);
              layoutId = R.layout.child_view;
          }
          @Override
          public void onBindViewHolder(RecyclerView.ViewHolder holder, Data item, int position) {
              ((ChildViewHolder )holder).onBindViewHolder(item, position);
  }
  
  @NotNull
  @Override
  public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent) {
  
      View vw = LayoutInflater.from(parent.getContext()).inflate(layoutId, parent, false);
      return new ChildViewHolder(vw, clickHandler);
  
  }
  }
  </code></pre>