Files
kotlin-fork/compiler/testData/ir/irText/declarations/provideDelegate/local.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

81 lines
3.3 KiB
Kotlin
Vendored

// CHECK:
// Mangled name: Delegate
// Public signature: /Delegate|null[0]
class Delegate {
// CHECK:
// Mangled name: Delegate{}value
// Public signature: /Delegate.value|1987073854177347439[0]
// Public signature debug description: {}value
val value: String
// CHECK JVM_IR:
// Mangled name: Delegate#<get-value>(){}kotlin.String
// Public signature: /Delegate.value.<get-value>|-7202092821145242726[0]
// Public signature debug description: <get-value>(){}kotlin.String
// CHECK JS_IR NATIVE:
// Mangled name: Delegate#<get-value>(){}
// Public signature: /Delegate.value.<get-value>|3260093555963109437[0]
// Public signature debug description: <get-value>(){}
get
// CHECK:
// Mangled name: Delegate#<init>(kotlin.String){}
// Public signature: /Delegate.<init>|1280618353163213788[0]
// Public signature debug description: <init>(kotlin.String){}
constructor(value: String) /* primary */
// CHECK JVM_IR:
// Mangled name: Delegate#getValue(kotlin.Any?;kotlin.Any?){}kotlin.String
// Public signature: /Delegate.getValue|-3989854329232997863[0]
// Public signature debug description: getValue(kotlin.Any?;kotlin.Any?){}kotlin.String
// CHECK JS_IR NATIVE:
// Mangled name: Delegate#getValue(kotlin.Any?;kotlin.Any?){}
// Public signature: /Delegate.getValue|-9077843357189755365[0]
// Public signature debug description: getValue(kotlin.Any?;kotlin.Any?){}
operator fun getValue(thisRef: Any?, property: Any?): String
}
// CHECK:
// Mangled name: DelegateProvider
// Public signature: /DelegateProvider|null[0]
class DelegateProvider {
// CHECK:
// Mangled name: DelegateProvider{}value
// Public signature: /DelegateProvider.value|1987073854177347439[0]
// Public signature debug description: {}value
val value: String
// CHECK JVM_IR:
// Mangled name: DelegateProvider#<get-value>(){}kotlin.String
// Public signature: /DelegateProvider.value.<get-value>|-7202092821145242726[0]
// Public signature debug description: <get-value>(){}kotlin.String
// CHECK JS_IR NATIVE:
// Mangled name: DelegateProvider#<get-value>(){}
// Public signature: /DelegateProvider.value.<get-value>|3260093555963109437[0]
// Public signature debug description: <get-value>(){}
get
// CHECK:
// Mangled name: DelegateProvider#<init>(kotlin.String){}
// Public signature: /DelegateProvider.<init>|1280618353163213788[0]
// Public signature debug description: <init>(kotlin.String){}
constructor(value: String) /* primary */
// CHECK JVM_IR:
// Mangled name: DelegateProvider#provideDelegate(kotlin.Any?;kotlin.Any?){}Delegate
// Public signature: /DelegateProvider.provideDelegate|8347738726431448305[0]
// Public signature debug description: provideDelegate(kotlin.Any?;kotlin.Any?){}Delegate
// CHECK JS_IR NATIVE:
// Mangled name: DelegateProvider#provideDelegate(kotlin.Any?;kotlin.Any?){}
// Public signature: /DelegateProvider.provideDelegate|-8444239183469250963[0]
// Public signature debug description: provideDelegate(kotlin.Any?;kotlin.Any?){}
operator fun provideDelegate(thisRef: Any?, property: Any?): Delegate
}
// CHECK:
// Mangled name: #foo(){}
// Public signature: /foo|-1041209573719867811[0]
// Public signature debug description: foo(){}
fun foo(): Unit