[Psi2Ir] Fix generation of hashcode for generic inline class

This commit is contained in:
Roman Artemev
2020-02-14 17:42:12 +03:00
committed by romanart
parent 6a37955a36
commit 5004bb3636
13 changed files with 313 additions and 0 deletions
@@ -0,0 +1,16 @@
// !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"
}