[AA] Fix processing of declared constructors in enhancement scope

^KTIJ-24948 Fixed
This commit is contained in:
aleksandrina-streltsova
2023-03-16 09:25:11 +02:00
committed by Space Team
parent 46db4b4e6d
commit f39d5d57e1
6 changed files with 71 additions and 4 deletions
@@ -64,10 +64,8 @@ internal class JavaClassDeclaredMembersEnhancementScope(
}
override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) {
owner.declarations.filterIsInstance<FirConstructor>().forEach { constructor ->
useSiteMemberEnhancementScope.processDeclaredConstructors {
processor(constructor.symbol)
}
useSiteMemberEnhancementScope.processDeclaredConstructors { symbol ->
processor(symbol)
}
}
@@ -57,4 +57,10 @@ public class FirIdeNormalAnalysisSourceModuleDeclaredMemberScopeTestGenerated ex
public void testJavaDeclaredInheritList() throws Exception {
runTest("analysis/analysis-api/testData/scopes/declaredMemberScope/javaDeclaredInheritList.kt");
}
@Test
@TestMetadata("javaInnerClassConstructor.kt")
public void testJavaInnerClassConstructor() throws Exception {
runTest("analysis/analysis-api/testData/scopes/declaredMemberScope/javaInnerClassConstructor.kt");
}
}