Created
October 12, 2020 12:34
-
-
Save ch8n/c344148d76bc66d9f63275dd44bf34b8 to your computer and use it in GitHub Desktop.
empty map resolving
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <K, V> mapOf(): Map<K, V> = emptyMap() | |
// emptyMap is resolved by | |
object EmptyMap : Map<Any?, Nothing>, Serializable | |
// which return read-only empty map implementation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment