[FIR] Add tests for top-level property initialization in scripts

- The test data is missing initialization checks and will be fixed with
  the subsequent commit.
- The test data is originally taken from
  `backingField/TopLevelPropertyInitialization` and has been simplified.
- I didn't add `const val` properties to the test data (compared to the
  original) due to KT-20110.

^KT-63286
This commit is contained in:
Marco Pennekamp
2023-11-07 22:42:48 +01:00
committed by Space Team
parent 891e1fb59b
commit 1cc2390af6
6 changed files with 140 additions and 0 deletions
@@ -30288,6 +30288,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/script/topLevelPropertiesWithGetSet.kts");
}
@Test
@TestMetadata("topLevelPropertyInitialization.kts")
public void testTopLevelPropertyInitialization() throws Exception {
runTest("compiler/testData/diagnostics/tests/script/topLevelPropertyInitialization.kts");
}
@Test
@TestMetadata("topLevelVariable.kts")
public void testTopLevelVariable() throws Exception {
@@ -30288,6 +30288,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/script/topLevelPropertiesWithGetSet.kts");
}
@Test
@TestMetadata("topLevelPropertyInitialization.kts")
public void testTopLevelPropertyInitialization() throws Exception {
runTest("compiler/testData/diagnostics/tests/script/topLevelPropertyInitialization.kts");
}
@Test
@TestMetadata("topLevelVariable.kts")
public void testTopLevelVariable() throws Exception {