3a5d0ab427
The problem here was that although the IR type of the expression was primitive, the type of the actual expression in the bytecode generated after type erasure was `Ljava/lang/Object;`, and we were trying to call a non-existing method `Object.hashCode(Object)`. #KT-41669 Fixed
12 lines
200 B
Kotlin
Vendored
12 lines
200 B
Kotlin
Vendored
// JVM_TARGET: 1.8
|
|
|
|
class A<T> {
|
|
fun id(x: T): T = x
|
|
}
|
|
|
|
fun foo(f: A<Boolean>): Int =
|
|
f.id(true).hashCode()
|
|
|
|
fun box(): String =
|
|
if (foo(A<Boolean>()) == true.hashCode()) "OK" else "Fail"
|