Files
kotlin-fork/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt
T
Vladimir Sukharev f9df4e1487 [K/N] Reorder hashCode, toString, equals in data classes to match K1 order
^KT-60247 Fixed

Merge-request: KT-MR-11080
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-07-18 00:06:48 +00:00

17 lines
294 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +InlineClasses
class C<T>(val t: T) {
override fun hashCode(): Int = t as Int
}
inline class IC<TT>(val c: C<TT>) {
fun foo(): Int = c.hashCode()
}
fun box(): String {
val ic = IC<Int>(C(42))
if (ic.foo() != 42) return "FAIL"
return "OK"
}