diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassDeclaredMemberScope.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassDeclaredMemberScope.kt index 89c33e8ab53..45f96a38b36 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassDeclaredMemberScope.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassDeclaredMemberScope.kt @@ -30,7 +30,7 @@ class FirClassDeclaredMemberScope( when (declaration) { is FirCallableMemberDeclaration<*> -> { val name = when (declaration) { - is FirConstructor -> Name.special("") + is FirConstructor -> constructorName is FirVariable<*> -> declaration.name is FirSimpleFunction -> declaration.name else -> continue@loop @@ -43,6 +43,7 @@ class FirClassDeclaredMemberScope( } override fun processFunctionsByName(name: Name, processor: (FirFunctionSymbol<*>) -> Unit) { + if (name == constructorName) return val symbols = callablesIndex[name] ?: emptyList() for (symbol in symbols) { if (symbol is FirFunctionSymbol<*>) { @@ -52,7 +53,7 @@ class FirClassDeclaredMemberScope( } override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) { - val symbols = callablesIndex[Name.special("")] ?: return + val symbols = callablesIndex[constructorName] ?: return for (symbol in symbols) { if (symbol is FirConstructorSymbol) { processor(symbol) @@ -76,3 +77,6 @@ class FirClassDeclaredMemberScope( nestedClassifierScope?.processClassifiersByNameWithSubstitution(name, processor) } } + + +private val constructorName = Name.special("") \ No newline at end of file