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.
29 lines
716 B
Kotlin
Vendored
29 lines
716 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// IGNORE_BACKEND: JVM_IR
|
|
|
|
inline class Id(val id: String)
|
|
|
|
inline class Name(val name: String)
|
|
|
|
inline class Password(val password: String)
|
|
|
|
fun test(id: Id) {
|
|
if (id.id != "OK") throw AssertionError()
|
|
}
|
|
|
|
fun test(id: Id?) {
|
|
if (id != null) throw AssertionError()
|
|
}
|
|
|
|
fun test(name: Name) {
|
|
if (name.name != "OK") throw AssertionError()
|
|
}
|
|
|
|
fun test(password: Password) {
|
|
if (password.password != "OK") throw AssertionError()
|
|
}
|
|
|
|
// 1 public final static test-tmnojjU\(Ljava/lang/String;\)V
|
|
// 1 public final static test-hI9h0ro\(Ljava/lang/String;\)V
|
|
// 1 public final static test-75PUH38\(Ljava/lang/String;\)V
|
|
// 1 public final static test-3mN7H-Y\(Ljava/lang/String;\)V |