I would like to access the scope of the calling class when creating an "anonymous inner class"
in Kotlin. What would be the equivalent of Java's OuterScope.this
syntax? example :
open class SomeClass {
open fun doSomething() {
// ...
}
}
class MyClass {
fun someFunc() {
object : SomeClass() {
override fun doSomething() {
super<SomeClass>.doSomething()
// Access the outer class context, in Java
// this would be MyClass.this
}
}
}
}