import kotlin.reflect.* fun checkSubtype(t: T) = t class A(var g: A) { val f: Int = 0 fun test() { checkSubtype>(::f) checkSubtype>(::g) } }