mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
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
16 lines
257 B
Kotlin
Vendored
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;
|
|
} |