KT-61568 [FIR][AA] Do not add redundant file scopes in AllCandidatesResolver

`firResolveSession.getTowerContextProvider` should already
contain all the relevant scopes, including default and
importing scopes for the file

Because of this, import and default scopes had presence over the
more local scopes, and the resolve was performed incorrecty - top level
candidates were given higher priority

^KT-61568 Fixed
^KTIJ-26824 Fixed
This commit is contained in:
Roman Golyshev
2023-08-30 12:21:32 +02:00
committed by Space Team
parent 826297979d
commit 21dffe4639
6 changed files with 93 additions and 4 deletions
@@ -435,6 +435,12 @@ public class FirStandaloneNormalAnalysisSourceModuleResolveCandidatesTestGenerat
runTest("analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/memberFunctionCallWithTypeArgument.kt");
}
@Test
@TestMetadata("memberFunctionVsTopLevel.kt")
public void testMemberFunctionVsTopLevel() throws Exception {
runTest("analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/memberFunctionVsTopLevel.kt");
}
@Test
@TestMetadata("privateMember.kt")
public void testPrivateMember() throws Exception {