mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
Basic reflection is usable without any imports (with :: literals)
This reverts commit 9503056dd5.
18 lines
197 B
Kotlin
18 lines
197 B
Kotlin
// FILE: a.kt
|
|
|
|
package a.b.c
|
|
|
|
class D {
|
|
fun foo() = 42
|
|
}
|
|
|
|
// FILE: b.kt
|
|
|
|
import kotlin.reflect.KMemberFunction0
|
|
|
|
fun main() {
|
|
val x = a.b.c.D::foo
|
|
|
|
x : KMemberFunction0<a.b.c.D, Int>
|
|
}
|