Support KCallable.call

#KT-2187 Fixed
This commit is contained in:
Alexander Udalov
2015-07-16 21:45:28 +03:00
parent ffe32e0b6d
commit e079b8f425
22 changed files with 462 additions and 3 deletions
@@ -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"
}