In Kotlin,the code in an object expression can access variables from the scope that contains it, just like the following code:
fun countClicks(window: JCompo
With Android Studio 3.2, this nice little message tells you whats going on with projectType var inside the closure.
projectType