title: Constructor of inner class ViewHolder can be called only with receiver of containing class
body: <p>I want to set a  listener on RecyclerView items using RxJava2. The items are checkboxes. I want to listen to each item separately.
  So I am getting an error Constructor of inner class ViewHolder can be called only with receiver of containing class in the</p>
  
  <blockquote>
    <p>return TraceAdapter.ViewHolder(view)</p>
  </blockquote>
  
  <pre><code>class TraceAdapter(private var checkList: List&lt;TraceViewModelRow&gt; = listOf()) :
      RecyclerView.Adapter&lt;TraceAdapter.ViewHolder&gt;() {
  
  private val publishSubject = PublishSubject.create&lt;Event&gt;()
  val events: Observable&lt;Event&gt; = publishSubject
  
  override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TraceAdapter.ViewHolder {
      val view = LayoutInflater.from(parent.context).inflate(R.layout.item_trace_task, parent, false)
      return TraceAdapter.ViewHolder(view)
  }
  
  override fun getItemCount(): Int = checkList.size
  
  override fun onBindViewHolder(holder: TraceAdapter.ViewHolder, position: Int) {
  
      holder.bindTraceList(checkList[position])
  
  }
  
  override fun onViewRecycled(holder: ViewHolder) {
      super.onViewRecycled(holder)
  }
  
  inner class ViewHolder(override val containerView: View) : RecyclerView.ViewHolder(containerView), LayoutContainer {
  
      fun bindTraceList(trace: TraceViewModelRow) {
          with(trace) {
              checkbox_itemText.clicks()
                      .map { checkList[layoutPosition] }
                      .subscribe { publishSubject }
  
              checkbox_itemText.text = description
              checkbox_itemText.isChecked = isChecked
          }
      }
  }
  }
  </code></pre>