I see this function on kotlinlang.org, but i don't know how to use it.
operator fun <V, V1 : V> Map<in String, V>.getValue(
thisRef: Any?,
property: KProperty<*>
): V1
For example, I have this map: val map = mapOf("one" to 1). How do you get 1 with this getValue function?
UPDATE:
Is there any way that you can get it to work with val anotherMap = mapOf(1 to 1). Now the key is an Int. I've changed Map to Map<in Int, V>, but it won't work.