JVM: Generate equals-impl0 method for inline classes

This commit is contained in:
Steven Schäfer
2019-08-22 12:09:28 +02:00
committed by Alexander Udalov
parent 2c7da67600
commit f53b28e8a3
5 changed files with 45 additions and 32 deletions
@@ -15,11 +15,7 @@ fun box(): String {
Simple::class.java.getDeclaredMethod(name, String::class.java, String::class.java)
?: return "$name not found"
val result = try {
specializedEquals.invoke(null, "a", "b")
} catch (e: InvocationTargetException) {
return if (e.targetException is NullPointerException) "OK" else "${e.targetException}"
}
return if (result == false) "OK" else "Fail"
if (specializedEquals.invoke(null, "a", "b") as Boolean)
return "Fail"
return "OK"
}