Files
kotlin/compiler/testData/codegen/box/classes/inner/properSuperLinking.kt
Michael Bogdanov 15eaa15b65 Fix for KT-7421: Unable to inherit from inner class
Fix for KT-6708: Compiler Error when extending open inner class: "java.lang.RuntimeException: Error generating primary constructor of class InnerB with kind IMPLEMENTATION"

  #KT-7421 Fixed
  #KT-6708 Fixed
2015-11-03 10:14:57 +03:00

16 lines
257 B
Kotlin
Vendored

open class A(val s: String) {
val z = s
fun test() = s
open inner class B(s: String): A(s) {
fun testB() = z + test()
}
}
fun box(): String {
val res = A("Fail").B("OK").testB()
return if (res == "OKOK") "OK" else res;
}