Support KClass.functions and declaredFunctions
This commit is contained in:
Vendored
+4
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user