Using external variables inside expressions in Kotlin
I want to get access to the AlertDialog instance, but in Kotlin I don't have access. Why?
fun showDialog(){
val alertDialog = AlertDialog.Builder(this)
.setPositiveButton(R.string.get_info) { dialogInterface, i ->
alertDialog //here is the error
}
...
}