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.
20 lines
337 B
Kotlin
Vendored
20 lines
337 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
|
|
// FILE: Z.kt
|
|
interface IFoo {
|
|
fun foo()
|
|
}
|
|
|
|
inline class Z(val x: Int) : IFoo {
|
|
override fun foo() {}
|
|
}
|
|
|
|
// FILE: test.kt
|
|
fun testZ(z: Z) = z.foo()
|
|
|
|
fun testNZ(z: Z?) = z?.foo()
|
|
|
|
// @TestKt.class:
|
|
// 0 INVOKESTATIC Z\$Erased\.foo
|
|
// 0 INVOKESTATIC Z\-Erased\.foo
|
|
// 2 INVOKESTATIC Z\.foo-impl \(I\)V |