Support KCallable.call
#KT-2187 Fixed
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.lang.reflect.InvocationTargetException
|
||||
|
||||
fun fail(message: String) {
|
||||
throw AssertionError(message)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
::fail.call("OK")
|
||||
} catch (e: InvocationTargetException) {
|
||||
return e.getTargetException().getMessage().toString()
|
||||
}
|
||||
|
||||
return "Fail: no exception was thrown"
|
||||
}
|
||||
Reference in New Issue
Block a user