```var myVar : String get() = functionUsingThe...
# reflect
d
Copy code
var myVar : String
    get() = functionUsingTheVariableName(::field.name)
I would like to do this, but I get:
Unsupported [References to variables aren't supported yet]
any alternative?
e
why not
functionUsingTheVariableName(::myVar.name)
?
else you could probably get super fancy with
Copy code
operator fun <T> ((String) -> T).getValue(thisRef: Any?, property: KProperty<*>): T = invoke(property.name)

val myVar: String by ::functionUsingTheVariableName
d
the whole point is was not to repeat the name of the variable
but yes, I looked into the Delegated Properties and I also found it suits the best!
thanks