JVM_IR KT-42020 special IdSignature for some fake override members

This commit is contained in:
Dmitry Petrov
2020-12-14 11:53:13 +03:00
parent 12cfba9ca9
commit b0f6461fa9
22 changed files with 1487 additions and 20 deletions
@@ -0,0 +1,29 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// ^ TODO decide if we want to fix KT-42020 for FIR as well
open class Base<T> {
fun foo(x: T) = "x:$x"
fun foo(y: String) = "y:$y"
}
open class Derived : Base<String>()
fun box(): String {
val b = Base<String>()
val test1 = b.foo(x = "O") + b.foo(y = "K")
if (test1 != "x:Oy:K")
throw Exception("test1: $test1")
val d = Derived()
val test2 = d.foo(x = "O") + d.foo(y = "K")
if (test2 != "x:Oy:K")
throw Exception("test2: $test2")
val bd: Base<String> = Derived()
val test4 = bd.foo(x = "O") + bd.foo(y = "K")
if (test4 != "x:Oy:K")
throw Exception("test4: $test4")
return "OK"
}
@@ -3,7 +3,6 @@
// IGNORE_BACKEND: JS
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND_FIR: JVM_IR
// MODULE: lib