I’m looking for a way to extend a non-static nested class from Kotlin.
From the JLS Chapter 8
Example 8.8.7.1-1. Qualified Superclass Constructor Invocation
// Java Code
class Outer {
class Inner {}
}
class ChildOfInner extends Outer.Inner {
ChildOfInner() { (new Outer()).super(); }
}
I tried this:
// Kotlin Code
class Outer {
open inner class Inner {}
}
val outer = Outer()
class ChildOfInner(): outer.Inner()
Is there any way to do this in Kotlin?