Mangle inline class members
<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.
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Z(val data: Int)
|
||||
|
||||
fun box(): String {
|
||||
if (Z(0) != Z(0)) throw AssertionError()
|
||||
if (Z(0) == Z(1)) throw AssertionError()
|
||||
|
||||
if (Z(1234).hashCode() != 1234) throw AssertionError(Z(1234).hashCode().toString())
|
||||
|
||||
if (Z(0).toString() != "Z(data=0)") throw AssertionError(Z(0).toString())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user