FIR ScopeSession: use HashMap instead of LinkedHashMap

This commit is contained in:
Mikhail Glukhikh
2019-09-30 17:15:25 +03:00
parent 813e35643c
commit e48428d39d
@@ -32,10 +32,10 @@ fun lookupSuperTypes(
}
class ScopeSession {
private val scopes = mutableMapOf<FirClassifierSymbol<*>, MutableMap<ScopeSessionKey<*>, FirScope>>()
private val scopes = hashMapOf<FirClassifierSymbol<*>, HashMap<ScopeSessionKey<*>, FirScope>>()
fun <T : FirScope> getOrBuild(symbol: FirClassifierSymbol<*>, key: ScopeSessionKey<T>, build: () -> T): T {
return scopes.getOrPut(symbol) {
mutableMapOf()
hashMapOf()
}.getOrPut(key) {
build()
} as T