From 4f4b30ee285f78c802ed51c9792009f50a4a2368 Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Thu, 10 Aug 2023 15:15:28 +0200 Subject: [PATCH] [LL FIR] dependent analyze: add test on different statements in script It contains a wrong result. Will be fixed in the next commit ^KT-60987 --- .../moreStatementsInCopy.context.txt | 40 +++++++++++++++++++ .../moreStatementsInCopy.copy.txt | 18 +++++++++ .../moreStatementsInCopy.fir.txt | 22 ++++++++++ .../dependentCopy/moreStatementsInCopy.kts | 14 +++++++ ...riptDependentCopyContextTestGenerated.java | 6 +++ .../ScriptDependentCopyFirTestGenerated.java | 6 +++ 6 files changed, 106 insertions(+) create mode 100644 analysis/low-level-api-fir/testdata/dependentCopy/moreStatementsInCopy.context.txt create mode 100644 analysis/low-level-api-fir/testdata/dependentCopy/moreStatementsInCopy.copy.txt create mode 100644 analysis/low-level-api-fir/testdata/dependentCopy/moreStatementsInCopy.fir.txt create mode 100644 analysis/low-level-api-fir/testdata/dependentCopy/moreStatementsInCopy.kts diff --git a/analysis/low-level-api-fir/testdata/dependentCopy/moreStatementsInCopy.context.txt b/analysis/low-level-api-fir/testdata/dependentCopy/moreStatementsInCopy.context.txt new file mode 100644 index 00000000000..f9b1591c42f --- /dev/null +++ b/analysis/low-level-api-fir/testdata/dependentCopy/moreStatementsInCopy.context.txt @@ -0,0 +1,40 @@ +Tower Data Context: + Element 0 + Scope: FirDefaultStarImportingScope + Element 1 + Scope: FirDefaultSimpleImportingScope + Element 2 + Scope: FirExplicitStarImportingScope + Element 3 + Scope: FirDefaultSimpleImportingScope + Element 4 + Scope: FirDefaultSimpleImportingScope + Element 5 + Scope: FirPackageMemberScope + Element 6 + Scope: FirExplicitSimpleImportingScope + Element 7 + Scope: FirScriptDeclarationsScope + Functions + FirNamedFunctionSymbol public? final? fun foo(i: Int, action: ( (Int) -> Unit )): R|kotlin/Unit| + FirNamedFunctionSymbol public? final? fun foo(i: Int, action: ( (Int) -> Unit )): R|kotlin/Unit| + FirNamedFunctionSymbol public? final? fun scriptFunction(): + FirNamedFunctionSymbol public? final? fun unusedScriptFunction(p: String): + FirNamedFunctionSymbol public? final? fun unusedScriptFunction(p: String): + Element 8 + Scope: FirLocalScope + Properties: + FirPropertySymbol lval args: R|kotlin/Array| + Element 9 + Context receivers: + FirScriptSymbol context(