It's object expression which is more general analogous to java's anonymous inner classes and since it is expression it closures `this` reference, so it's neither bug or outdated documentation. But i think someone from Kotlin team will provide more formal explanation
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
How to reference an anonymous inner class from the outer class? | 2 | 2338 | August 24, 2020 | |
Inner object in class cannot close over outer class members
|
6 | 6488 | February 4, 2023 | |
Anonymous Inner Class Equivalent
|
5 | 2070 | January 9, 2013 | |
Incorrect conversion for inner class anonymous extension | 3 | 745 | July 2, 2021 | |
Object expression in field resolves to kotlin.Any
|
4 | 2156 | December 22, 2017 |