Files
kotlin-fork/compiler/testData/ir/irText/classes/sealedClasses.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

81 lines
2.5 KiB
Kotlin
Vendored

// CHECK:
// Mangled name: Expr
// Public signature: /Expr|null[0]
sealed class Expr {
// CHECK:
// Mangled name: Expr.Const
// Public signature: /Expr.Const|null[0]
class Const : Expr {
// CHECK:
// Mangled name: Expr.Const{}number
// Public signature: /Expr.Const.number|-3213756739435629896[0]
val number: Double
// CHECK JVM_IR:
// Mangled name: Expr.Const#<get-number>(){}kotlin.Double
// Public signature: /Expr.Const.number.<get-number>|5647242881292479325[0]
// CHECK JS_IR NATIVE:
// Mangled name: Expr.Const#<get-number>(){}
// Public signature: /Expr.Const.number.<get-number>|-7703103523096162843[0]
get
// CHECK:
// Mangled name: Expr.Const#<init>(kotlin.Double){}
// Public signature: /Expr.Const.<init>|575075696928934302[0]
constructor(number: Double) /* primary */
}
// CHECK:
// Mangled name: Expr.Sum
// Public signature: /Expr.Sum|null[0]
class Sum : Expr {
// CHECK:
// Mangled name: Expr.Sum{}e1
// Public signature: /Expr.Sum.e1|3620889417967928691[0]
val e1: Expr
// CHECK JVM_IR:
// Mangled name: Expr.Sum#<get-e1>(){}Expr
// Public signature: /Expr.Sum.e1.<get-e1>|-1591404437553568512[0]
// CHECK JS_IR NATIVE:
// Mangled name: Expr.Sum#<get-e1>(){}
// Public signature: /Expr.Sum.e1.<get-e1>|-5200592901549843691[0]
get
// CHECK:
// Mangled name: Expr.Sum{}e2
// Public signature: /Expr.Sum.e2|6967693203503644767[0]
val e2: Expr
// CHECK JVM_IR:
// Mangled name: Expr.Sum#<get-e2>(){}Expr
// Public signature: /Expr.Sum.e2.<get-e2>|3855595078682840918[0]
// CHECK JS_IR NATIVE:
// Mangled name: Expr.Sum#<get-e2>(){}
// Public signature: /Expr.Sum.e2.<get-e2>|-59208052664646912[0]
get
// CHECK:
// Mangled name: Expr.Sum#<init>(Expr;Expr){}
// Public signature: /Expr.Sum.<init>|-2872031821614483406[0]
constructor(e1: Expr, e2: Expr) /* primary */
}
// CHECK:
// Mangled name: Expr.NotANumber
// Public signature: /Expr.NotANumber|null[0]
object NotANumber : Expr {
// CHECK:
// Mangled name: Expr.NotANumber#<init>(){}
// Public signature: /Expr.NotANumber.<init>|-5645683436151566731[0]
private constructor() /* primary */
}
// CHECK:
// Mangled name: Expr#<init>(){}
// Public signature: /Expr.<init>|-5645683436151566731[0]
protected constructor() /* primary */
}