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,16 @@
class A {
fun foo(x: Int, y: Int) = x + y
}
fun box(): String {
val x = (A::foo).call(A(), 42, 239)
if (x != 281) return "Fail: $x"
try {
(A::foo).call()
return "Fail: no exception"
}
catch (e: Exception) {}
return "OK"
}