title: I can't reach any class member from a nested class in Kotlin
body: <p>I want to access a member of the MainFragment class from PersonAdapter class but none of them are available. I tried making both the classes and the members public and private also but so far nothing worked. 
  I guess I'm missing something obvious but I just can't figure it out. </p>
  
  <pre><code>class MainFragment : Fragment() {
      lateinit var personAdapter: PersonAdapter
      lateinit var personListener: OnPersonSelected
      private var realm: Realm by Delegates.notNull()
      lateinit var realmListener: RealmChangeListener&lt;Realm&gt;
  
      override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
          val v = inflater.inflate(R.layout.fragment_main, container, false)
          return v
      }
  
      class PersonAdapter() : RecyclerView.Adapter&lt;ViewHolder&gt;() {
          var localPersonList = personList
  
          override fun onBindViewHolder(holder: ViewHolder, position: Int) {
              holder.bindItems(localPersonList[position])
  
              holder.itemView.setOnClickListener {
                  Toast.makeText(context, "click", Toast.LENGTH_SHORT).show()
                  //I want to reach personListener from here
              }
          }
  
          override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder {
              val v = LayoutInflater.from(parent!!.context).inflate(R.layout.person_list_item, parent, false)
              return ViewHolder(v)
          }
      }}
  </code></pre>