Is there anyway I can delegate to a getter :slight...
# getting-started
m
Is there anyway I can delegate to a getter 🙂 ? Something like
Copy code
class ReadLockFreeMutableMap<K, V>(
) : MutableMap<K, V> by mutableMap {
    private val mutableMap: MutableMap<K, V>
        get() {
            TODO()
        }
}
d
Nope!
h
Only if you move the getter to the constructor:
Copy code
class ReadLockFreeMutableMap<K, V>(
    private val mutableMap: MutableMap<K, V>
) : MutableMap<K, V> by mutableMap {
}
d
(Not really a getter at that point 😛 )
😆 1
m
Any particular reason this is not implemented? Seems rather useful...