Files
kotlin-fork/compiler/testData/ir/irText/declarations/extensionProperties.sig.kt.txt
T
Sergej Jaskiewicz 6e8283a6fe [IR] Dump IdSignatures and mangled names in irText tests
The reason #1 for this feature is that we want to test IdSignatures
generated for declarations. Currently, there is no (easy) way to ensure
that a change in the signature building logic doesn't cause any breaking
changes wrt klibs.

Now, most IdSignatures include hashed mangled names in them, so even if
we catch a regression where the included hash changes, there would be no
way of knowing immediately what caused it, unless we'd also have mangled
names in the expectations.

The reason #2 is to test the manglers themselves. Currently, there are
no tests for them. They heavily duplicate each other, this is already
causing issues (see KT-57427) that would be very hard to catch without
these tests.

^KT-58238 Fixed
2023-05-15 18:20:45 +00:00

68 lines
2.3 KiB
Kotlin
Vendored

// CHECK:
// Mangled name: Host
// Public signature: /Host|null[0]
class Host {
// CHECK:
// Mangled name: Host#<init>(){}
// Public signature: /Host.<init>|-5645683436151566731[0]
constructor() /* primary */
// CHECK:
// Mangled name: Host@kotlin.String{}test3
// Public signature: /Host.test3|6611475030333167314[0]
val String.test3: Int
// CHECK JVM_IR:
// Mangled name: Host#<get-test3>@kotlin.String(){}kotlin.Int
// Public signature: /Host.test3.<get-test3>|-8733015989987681805[0]
// CHECK JS_IR NATIVE:
// Mangled name: Host#<get-test3>@kotlin.String(){}
// Public signature: /Host.test3.<get-test3>|8733981612854462725[0]
get(): Int
// CHECK:
// Mangled name: Host@kotlin.String{}test4
// Public signature: /Host.test4|7486468124994005123[0]
var String.test4: Int
// CHECK JVM_IR:
// Mangled name: Host#<get-test4>@kotlin.String(){}kotlin.Int
// Public signature: /Host.test4.<get-test4>|5807409276278007610[0]
// CHECK JS_IR NATIVE:
// Mangled name: Host#<get-test4>@kotlin.String(){}
// Public signature: /Host.test4.<get-test4>|-1587066497248455001[0]
get(): Int
// CHECK:
// Mangled name: Host#<set-test4>@kotlin.String(kotlin.Int){}
// Public signature: /Host.test4.<set-test4>|8811649911764795566[0]
set(value: Int): Unit
}
// CHECK:
// Mangled name: @kotlin.String{}test1
// Public signature: /test1|-338155035617859525[0]
val String.test1: Int
// CHECK JVM_IR:
// Mangled name: #<get-test1>@kotlin.String(){}kotlin.Int
// Public signature: /test1.<get-test1>|-5900273555540008657[0]
// CHECK JS_IR NATIVE:
// Mangled name: #<get-test1>@kotlin.String(){}
// Public signature: /test1.<get-test1>|-5601238586673262455[0]
get(): Int
// CHECK:
// Mangled name: @kotlin.String{}test2
// Public signature: /test2|298349501950551030[0]
var String.test2: Int
// CHECK JVM_IR:
// Mangled name: #<get-test2>@kotlin.String(){}kotlin.Int
// Public signature: /test2.<get-test2>|3412895218642147211[0]
// CHECK JS_IR NATIVE:
// Mangled name: #<get-test2>@kotlin.String(){}
// Public signature: /test2.<get-test2>|1426339134726014217[0]
get(): Int
// CHECK:
// Mangled name: #<set-test2>@kotlin.String(kotlin.Int){}
// Public signature: /test2.<set-test2>|3674864148848971521[0]
set(value: Int): Unit