Support KClass.functions and declaredFunctions

This commit is contained in:
Alexander Udalov
2015-07-08 03:59:35 +03:00
parent 50dbda1e1a
commit da5cffdb60
7 changed files with 105 additions and 9 deletions
@@ -5,6 +5,8 @@ fun foo(bar: String): Int = bar.length()
class A(val c: String) {
fun foz(baz: Int) {}
fun Double.mext(mez: Long) {}
}
fun Int.qux(zux: String) {}
@@ -21,6 +23,8 @@ fun box(): String {
checkParameters(A::foz, listOf(null, "baz"))
checkParameters(Int::qux, listOf(null, "zux"))
checkParameters(A::class.functions.single { it.name == "mext" }, listOf(null, null, "mez"))
checkParameters(::A, listOf("c"))
return "OK"