[Analysis API Standalone] fix builtin resolution for common module

StubBasedBuiltInsSymbolProvider does not work for now for common modules (KT-61757)
 but compiler builtins provider `FirBuiltinSymbolProvider` works.

Also, stub-based symbol providers should not be used in standalone mode.

Testdata from standalone is updated because of the difference
in property accessors (KT-62449) between stub and compiler builtin symbol providers.

Additionally, this commit fixes the behavior of `KotlinStaticPsiDeclarationFromBinaryModuleProvider`.
As compiler builtin declarations have no PSI attached,
`KotlinStaticPsiDeclarationFromBinaryModuleProvider` is used to get PSI
from `DecompiledPsiDeclarationProvider.findPsi`.
`DecompiledPsiDeclarationProvider` is only used in UAST standalone mode.
This commit is contained in:
Ilya Kirillov
2023-10-06 21:47:15 +02:00
committed by Space Team
parent 5b4731a780
commit 7db2fc522e
24 changed files with 8197 additions and 44 deletions
@@ -1,2 +1,2 @@
Resolved to:
KtNamedFunction:add(element)
PsiMethod:add(p: PsiType:E): PsiType:void
@@ -1,3 +1,3 @@
fun box(map: MutableMap<String, String>) {
map.get<caret>OrDefault("key", "value")
map.g<caret>et("key")
}
@@ -1,2 +1,2 @@
Resolved to:
KtNamedFunction:getOrDefault(key, defaultValue)
PsiMethod:get(p: PsiType:Object): PsiType:V