<Kotlin class hierarchy and (co)variance> In my se...
# stackoverflow
u
Kotlin class hierarchy and (co)variance In my setup, I'm trying to have an interface Table that inherits from Map (because it will mostly be used as a wrapper around the map). Two classes inherit from Table - local and global. The global one will have a mutable map, and the local one will have a map of only local entries. // entries sealed class Entry { class EntryLocal : Entry class EntryGlobal : Entry } interface Table : Map { fun getRecursive(key: String): Entry? } class GlobalTable(val map:MutableMap) : Table,...