mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
<IMPL_SUFFIX> for method is a method signature hash, if method value parameter types contain inline class types, otherwise 'impl'. Constructor methods are named as 'constructor-<IMPL_SUFFIX>'. Synthesized 'box' and 'unbox' methods are named as '<METHOD_NAME>-<IMPL_SUFFIX>'. Erased implementations of overriding and non-overriding methods are named as '<METHOD_NAME>-<IMPL_SUFFIX>'. Fully specialized implementation of 'equals' will have a special suffix.
41 lines
798 B
Kotlin
Vendored
41 lines
798 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
|
|
// FILE: Z.kt
|
|
inline class Z(val x: Int) {
|
|
val aVal: Int
|
|
get() = x
|
|
|
|
var aVar: Int
|
|
get() = x
|
|
set(v) {}
|
|
|
|
val String.extVal: Int
|
|
get() = x
|
|
|
|
var String.extVar: Int
|
|
get() = x
|
|
set(v) {}
|
|
}
|
|
|
|
// FILE: test.kt
|
|
fun Z.test() {
|
|
aVal
|
|
aVar
|
|
aVar = 42
|
|
aVar++
|
|
|
|
"".extVal
|
|
"".extVar
|
|
"".extVar = 42
|
|
"".extVar++
|
|
}
|
|
|
|
// @TestKt.class:
|
|
// 0 INVOKESTATIC Z\$Erased\.
|
|
// 0 INVOKESTATIC Z\-Erased\.
|
|
// 1 INVOKESTATIC Z.getAVal-impl \(I\)I
|
|
// 2 INVOKESTATIC Z.getAVar-impl \(I\)I
|
|
// 2 INVOKESTATIC Z.setAVar-impl \(II\)V
|
|
// 1 INVOKESTATIC Z.getExtVal-impl \(ILjava/lang/String;\)I
|
|
// 2 INVOKESTATIC Z.getExtVar-impl \(ILjava/lang/String;\)I
|
|
// 2 INVOKESTATIC Z.setExtVar-impl \(ILjava/lang/String;I\)V |