mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 00:21:32 +00:00
19 lines
447 B
Kotlin
Vendored
19 lines
447 B
Kotlin
Vendored
import kotlin.reflect.*
|
|
import kotlin.reflect.KParameter.Kind.*
|
|
import kotlin.test.assertEquals
|
|
|
|
class A {
|
|
fun Int.foo(x: String) {}
|
|
|
|
inner class Inner(s: String) {}
|
|
}
|
|
|
|
fun box(): String {
|
|
val foo = A::class.memberExtensionFunctions.single()
|
|
|
|
assertEquals(listOf(INSTANCE, EXTENSION_RECEIVER, VALUE), foo.parameters.map { it.kind })
|
|
assertEquals(listOf(INSTANCE, VALUE), A::Inner.parameters.map { it.kind })
|
|
|
|
return "OK"
|
|
}
|