Files
kotlin-fork/compiler/testData/ir/irText/declarations/fakeOverrideModality.sig.kt.txt
T
Pavel Kunyavskiy c0152ccf0f [IRFakeOverrides] Convert lazy callables overriddens during f/o building
Unfortunately, it's not enough to know direct overriddens
to correctly build fake overrides. This mean, that we need to know
whole overridden tree during the process of building.

It happens automatically for normal classes, but not for lazy classes,
as their overriddens are built separatly.

This commit enforces correct overrddens for lazy classes in hierarhies
at the point, where they should be normally computed.

^KT-65236
2024-02-02 16:28:25 +00:00

72 lines
1.8 KiB
Kotlin
Vendored

// CHECK:
// Mangled name: A
// Public signature: /A|null[0]
abstract class A : J, I {
// CHECK:
// Mangled name: A#<init>(){}
// Public signature: /A.<init>|-5645683436151566731[0]
// Public signature debug description: <init>(){}
constructor() /* primary */
// CHECK JVM_IR:
// Mangled name: A#foo(){}Child
// Public signature: /A.foo|8517421086584195144[0]
// Public signature debug description: foo(){}Child
abstract /* fake */ override fun foo(): Child
}
// CHECK:
// Mangled name: Base
// Public signature: /Base|null[0]
open class Base {
// CHECK:
// Mangled name: Base#<init>(){}
// Public signature: /Base.<init>|-5645683436151566731[0]
// Public signature debug description: <init>(){}
constructor() /* primary */
}
// CHECK:
// Mangled name: Child
// Public signature: /Child|null[0]
class Child : Base {
// CHECK:
// Mangled name: Child#<init>(){}
// Public signature: /Child.<init>|-5645683436151566731[0]
// Public signature debug description: <init>(){}
constructor() /* primary */
}
// CHECK:
// Mangled name: J
// Public signature: /J|null[0]
abstract class J {
// CHECK:
// Mangled name: J#<init>(){}
// Public signature: /J.<init>|-5645683436151566731[0]
// Public signature debug description: <init>(){}
constructor() /* primary */
// CHECK JVM_IR:
// Mangled name: J#foo(){}Child
// Public signature: /J.foo|8517421086584195144[0]
// Public signature debug description: foo(){}Child
abstract fun foo(): Child
}
// CHECK:
// Mangled name: I
// Public signature: /I|null[0]
interface I {
// CHECK JVM_IR:
// Mangled name: I#foo(){}Base
// Public signature: /I.foo|-5590126600799232132[0]
// Public signature debug description: foo(){}Base
abstract fun foo(): Base
}