Support JVM polymorphic signature calls to methods with void return type

#KT-32026 Fixed
This commit is contained in:
Alexander Udalov
2019-10-29 15:32:40 +01:00
parent e009c7064e
commit 64d40b4743
7 changed files with 94 additions and 23 deletions
@@ -47,5 +47,16 @@ fun box(): String {
val r8 = mh.invoke(arrayOf(args))
if (r8 !is Array<*> || !r8.contentEquals(args)) return "Fail 8: $r8"
// The next two calls check behavior in a statement context (where the call result is not used)
try {
mh.invokeExact(args)
return "Fail 9"
} catch (e: WrongMethodTypeException) {
// OK
}
mh.invoke(args)
return "OK"
}