then what will happen if we do ``` open class O...
# announcements
p
then what will happen if we do
Copy code
open class Outer {
        val inner = Inner()
        open val foo = 3
        open inner class Inner {
            val innerFoo = foo // Accessing non-final property foo in constructor
        }
    }
?
k
That should trigger the warning "leaking
this
in constructor" on the
Inner()
call.
Because inner classes are equivalent to having a normal class with an implicit
Outer
parameter.
p
makes sense