Fixed bug in default args lowering + test
Made proper overridden descriptor selection.
This commit is contained in:
@@ -349,6 +349,11 @@ task function_defaults10(type: RunKonanTest) {
|
||||
source = "codegen/function/defaults10.kt"
|
||||
}
|
||||
|
||||
task function_defaults_from_fake_override(type: RunKonanTest) {
|
||||
goldValue = "42\n"
|
||||
source = "codegen/function/defaultsFromFakeOverride.kt"
|
||||
}
|
||||
|
||||
task sum_3const(type: RunKonanTest) {
|
||||
source = "codegen/function/sum_3const.kt"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package codegen.function.defaultsFromFakeOverride
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
interface I<T> {
|
||||
fun f(x: String = "42"): String
|
||||
}
|
||||
|
||||
open class A<T> {
|
||||
open fun f(x: String) = x
|
||||
}
|
||||
|
||||
class B : A<String>(), I<String>
|
||||
|
||||
@Test fun runTest() {
|
||||
val b = B()
|
||||
println(b.f())
|
||||
}
|
||||
Reference in New Issue
Block a user