KT-13440 Bound callable references in reflection

This commit is contained in:
Dmitry Petrov
2016-11-23 18:54:58 +03:00
parent 5879e201cd
commit 3d2696c81b
33 changed files with 1276 additions and 70 deletions
@@ -33,8 +33,9 @@ fun check(lambda: () -> Unit) {
lambda()
} catch (e: Throwable) {
if (e !is InvocationTargetException && e !is StackOverflowError) {
throw AssertionError("The current implementation uses reflection to get the value of the property," +
"so either InvocationTargetException or StackOverflowError should have happened, but was: ${e}")
throw RuntimeException("The current implementation uses reflection to get the value of the property," +
"so either InvocationTargetException or StackOverflowError should have happened",
e)
}
return
}