JVM_IR JavaSamConversionEqualsHashCode

This commit is contained in:
Dmitry Petrov
2022-03-02 16:15:17 +03:00
committed by Space
parent 870cdfd226
commit fdb01d96f0
15 changed files with 204 additions and 7 deletions
@@ -0,0 +1,17 @@
// !LANGUAGE: +JavaSamConversionEqualsHashCode
// TARGET_BACKEND: JVM_IR
// FULL_JDK
fun foo() {}
fun box(): String {
val r1 = Runnable(::foo)
val r2 = Runnable(::foo)
if (r1 != r2)
return "r1 != r2"
if (r1.hashCode() != r2.hashCode())
return "r1.hashCode() != r2.hashCode()"
return "OK"
}