Files
kotlin-fork/compiler/testData/ir/irText/expressions/objectByNameInsideObject.sig.kt.txt
T
Dmitriy Dolovov 02604060ae IR text tests: Don't dump signatures for local declarations
1. Local declarations don't participate in IR-linkage, because they
can be referenced only inside the same body -> can be dropped
from IR text tests.

2. Mangled names for private declarations computed by descriptors/fir
are actually not used anywhere (they are recomputed by IR
immediately before serialization of IR). But sometimes such
mangled names diverge between K1 and K2 -> don't check them, but
always check mangled names computed by IR even for private
declarations.

3. Also: Drop DUMP_LOCAL_DECLARATION_SIGNATURES test directive.

^KT-57428 Obsolete
^KT-57430 Obsolete
^KT-57434 Obsolete
^KT-57778 Obsolete
^KT-57775 Obsolete
2023-11-30 08:32:35 +00:00

75 lines
2.7 KiB
Kotlin
Vendored

// CHECK:
// Mangled name: Base
// Public signature: /Base|null[0]
open class Base {
// CHECK:
// Mangled name: Base{}f1
// Public signature: /Base.f1|-3626880138223960403[0]
// Public signature debug description: {}f1
val f1: Function0<Any>
// CHECK JVM_IR:
// Mangled name: Base#<get-f1>(){}kotlin.Function0<kotlin.Any>
// Public signature: /Base.f1.<get-f1>|8566118280674785385[0]
// Public signature debug description: <get-f1>(){}kotlin.Function0<kotlin.Any>
// CHECK JS_IR NATIVE:
// Mangled name: Base#<get-f1>(){}
// Public signature: /Base.f1.<get-f1>|-4995485398991269878[0]
// Public signature debug description: <get-f1>(){}
get
// CHECK:
// Mangled name: Base#<init>(kotlin.Function0<kotlin.Any>){}
// Public signature: /Base.<init>|-4146636346230466645[0]
// Public signature debug description: <init>(kotlin.Function0<kotlin.Any>){}
constructor(f1: Function0<Any>) /* primary */
}
// CHECK:
// Mangled name: Thing
// Public signature: /Thing|null[0]
object Thing : Base {
// CHECK:
// Mangled name: Thing#<init>(){}
// Public signature: /Thing.<init>|-5645683436151566731[0]
// Public signature debug description: <init>(){}
private constructor() /* primary */
// CHECK JVM_IR:
// Mangled name: Thing#test1(){}Thing
// Public signature: /Thing.test1|3967638963180272121[0]
// Public signature debug description: test1(){}Thing
// CHECK JS_IR NATIVE:
// Mangled name: Thing#test1(){}
// Public signature: /Thing.test1|4297044443957252634[0]
// Public signature debug description: test1(){}
fun test1(): Thing
// CHECK JVM_IR:
// Mangled name: Thing#test2(){}Thing
// Public signature: /Thing.test2|-7201124175106784013[0]
// Public signature debug description: test2(){}Thing
// CHECK JS_IR NATIVE:
// Mangled name: Thing#test2(){}
// Public signature: /Thing.test2|4279114864133353152[0]
// Public signature debug description: test2(){}
fun test2(): Thing
// CHECK:
// Mangled name: Thing{}f1
// Public signature: /Thing.f1|-3626880138223960403[0]
// Public signature debug description: {}f1
/* fake */ override val f1: Function0<Any>
// CHECK JVM_IR:
// Mangled name: Thing#<get-f1>(){}kotlin.Function0<kotlin.Any>
// Public signature: /Thing.f1.<get-f1>|8566118280674785385[0]
// Public signature debug description: <get-f1>(){}kotlin.Function0<kotlin.Any>
// CHECK JS_IR NATIVE:
// Mangled name: Thing#<get-f1>(){}
// Public signature: /Thing.f1.<get-f1>|-4995485398991269878[0]
// Public signature debug description: <get-f1>(){}
/* fake */ override get(): Function0<Any>
}