[AA] delegate to resolveToFirSymbol to avoid decompilation

`getReturnTypeForKtDeclaration` is called by UAST on probably compiled declarations.
In order to avoid redundant decompilation + building raw FIR + resolve,
let's delegate to deserialized FIR which is already prepared in stubs

Fixes KTIJ-24810

When `findSourceNonLocalFirDeclaration` is called on non-physical property accessor e.g.,
during completion, then traverse tree should allow drilling into FirProperty;
otherwise, no FIR would be found
This commit is contained in:
Anna Kozlova
2023-06-06 11:12:46 +02:00
committed by Space Team
parent 16644c1a3b
commit 09f4f0af66
7 changed files with 42 additions and 5 deletions
@@ -46,6 +46,12 @@ public class FirStandaloneNormalAnalysisSourceModuleTypeByDeclarationReturnTypeT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/types/byDeclarationReturnType"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("anonymousFunction.kt")
public void testAnonymousFunction() throws Exception {
runTest("analysis/analysis-api/testData/types/byDeclarationReturnType/anonymousFunction.kt");
}
@Test
@TestMetadata("localClassType.kt")
public void testLocalClassType() throws Exception {