Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/property/classFromClass.kt
T
Alexander Udalov 30794060a9 Simplify property hierarchy in reflection
Leave only 3*2 = 6 classes: KProperty0, KProperty1, KProperty2 and their
mutable analogs, depending on the number of receivers a property takes
2015-07-10 20:10:09 +03:00

13 lines
215 B
Kotlin
Vendored

// !DIAGNOSTICS:-UNUSED_VARIABLE
import kotlin.reflect.*
class A(var g: A) {
val f: Int = 0
fun test() {
val fRef: KProperty1<A, Int> = ::f
val gRef: KMutableProperty1<A, A> = ::g
}
}