Files
kotlin-fork/compiler/testData/codegen/box/fir/localOverrideWithDefaultInOverridden.kt
T
Denis.Zharkov c474c54903 FIR2IR: Fix IAE for case of local override of a method with defaults
It was happening because for MyClass.foo we didn't set overriddenSymbols
properly because in ClassMemberGenerator.convertFunctionContent we
used incorrect containingFirClass that was pointing to anonymous class
instead of MyClass.

^KT-58902 Fixed
2023-06-08 08:04:03 +00:00

15 lines
292 B
Kotlin
Vendored

// ISSUE: KT-58902
open class A {
open fun foo(x: String, y: String? = null): String = x + (y ?: "K")
}
fun box(): String {
return run {
class MyClass : A() {
override fun foo(x: String, y: String?) = super.foo(x, y)
}
MyClass()
}.foo("O")
}