Files
kotlin-fork/compiler/testData/codegen/box/innerNested/kt3927.kt
T

24 lines
371 B
Kotlin
Vendored

//KT-3927 Inner class cannot be instantiated with child instance of outer class
abstract class Base {
inner class Inner {
fun o() = "O"
fun k() = "K"
}
}
class Child : Base()
fun box(): String {
var result = ""
result += Child().Inner().o()
fun Child.f() {
result += Inner().k()
}
Child().f()
return result
}