IR: produce new fake override for each static member
This is an addition to d4278250e6. Apparently we still need to produce
a new fake override for each inherited static member, because otherwise
we would try to determine the most specific return type, maximum
visibility, etc, all of which makes no sense for static members.
#KT-66152 Fixed
This commit is contained in:
committed by
Space Team
parent
f204293e4d
commit
5cda3fba12
+18
@@ -0,0 +1,18 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: A.java
|
||||
public class A {
|
||||
public static <T> String f(T x) {
|
||||
return "Fail";
|
||||
}
|
||||
|
||||
public static String f(CharSequence c) {
|
||||
return c.toString();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
class B : A() {
|
||||
fun g(): String = f("OK")
|
||||
}
|
||||
|
||||
fun box(): String = B().g()
|
||||
Reference in New Issue
Block a user