How can I access outer scope from an inner class when I create an extension function for it?
Example
class A {
inner class B {
fun own() = this@A
}
}
This code compiles and executes as it is supposed to.
When I add the following extension function
fun A.B.ext() = this@A
The compilation fails with
Error:(7, 22) Kotlin: Unresolved reference: @A
I read the documentation for qualified this and it briefly mentions extension functions, but without any example.
Is it possible to access outer scope from extension functions?