kotlin: References to variables aren't supported yet
I want to get variable's name, like the result of ::x.name is x.
But why not work like this?
val x = 1
fun main() {
println(::x.name)
val y = 1
println(::y.name)
}
It will get a compile error: Unsupported [References to variables aren't supported yet]
Any suggestions are welcome, thanks~