KT-41346 Cleanup DeserializedMemberScope

This commit is contained in:
Roman Golyshev
2020-09-17 17:03:24 +03:00
parent 622f71bd65
commit 4f4c25ca5e
@@ -82,14 +82,14 @@ abstract class DeserializedMemberScope protected constructor(
internal val classNames by c.storageManager.createLazyValue { classNames().toSet() }
private val classifierNamesLazy = c.storageManager.createNullableLazyValue {
private val classifierNamesLazy by c.storageManager.createNullableLazyValue {
val nonDeclaredNames = getNonDeclaredClassifierNames() ?: return@createNullableLazyValue null
this.classNames + typeAliasNames + nonDeclaredNames
}
override fun getFunctionNames() = functionNamesLazy
override fun getVariableNames() = variableNamesLazy
override fun getClassifierNames(): Set<Name>? = classifierNamesLazy()
override fun getClassifierNames(): Set<Name>? = classifierNamesLazy
override fun definitelyDoesNotContainName(name: Name): Boolean {
return name !in functionNamesLazy && name !in variableNamesLazy && name !in classNames && name !in typeAliasNames