Mark
08/19/2020, 4:59 AMemptyList()
for example:
val retrievedList = myMap[someKey] ?: emptyList()
now gives a compiler warning (though the IDE doesn’t complain) when trying to access items in retrievedList
so I need to explicitly set List<MyListItemType>
as the retrievedList
type or the emptyList()
generic. I can’t seem to reproduce this in the kotlin playground, so can only assume there is some inconsistency caused by my gradle build scripts or some build caching issue.ephemient
08/19/2020, 3:41 PMval retrievedList = myMap[someKey].orEmpty()
could work, right?