[Analysis API FIR] KtSymbolContainingDeclarationProvider: support script declarations

This commit also fixes a missing symbol for KtScriptInitializer
and some symbol pointers
Many tests marked as 'DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE'
due to KtFirFileSymbol#createPointer logic – the pointer can
be created only for PSI

^KT-61451
^KT-61887
^KT-62626 Fixed
^KT-62693
This commit is contained in:
Dmitrii Gridin
2023-10-18 20:11:46 +02:00
committed by Space Team
parent d689c1a38f
commit 17ab005668
23 changed files with 1389 additions and 27 deletions
@@ -67,7 +67,7 @@ import org.jetbrains.kotlin.generators.util.TestGeneratorUtil
internal fun AnalysisApiTestGroup.generateAnalysisApiTests() {
test(
AbstractReferenceResolveTest::class,
filter = testModuleKindIs(TestModuleKind.Source, TestModuleKind.LibrarySource) and
filter = testModuleKindIs(TestModuleKind.Source, TestModuleKind.ScriptSource, TestModuleKind.LibrarySource) and
analysisApiModeIs(AnalysisApiMode.Ide, AnalysisApiMode.Standalone),
) { data ->
when (data.moduleKind) {
@@ -79,6 +79,8 @@ internal fun AnalysisApiTestGroup.generateAnalysisApiTests() {
)
}
TestModuleKind.ScriptSource -> model(data, "referenceResolve")
else -> {
model("referenceResolve", pattern = TestGeneratorUtil.KT_WITHOUT_DOTS_IN_NAME)
}