[AA] Add tests for diagnostics suppression on top-level declarations in scripts

- `scriptUninitializedTopLevelProperty` is currently disabled in FIR
  because it fails with a mismatch between diagnostics from the file and
  the individual elements. It will be enabled in the next commit.

^KT-62899
This commit is contained in:
Marco Pennekamp
2023-11-09 16:31:45 +01:00
committed by Space Team
parent c9cb2062bd
commit c482786bc4
5 changed files with 32 additions and 0 deletions
@@ -0,0 +1,4 @@
// IGNORE_FIR
@Suppress("MUST_BE_INITIALIZED")
val foo: Int
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtStringTemplateExpression at (1,11-32)
ERROR_SUPPRESSION text ranges: [(10,31)]
PSI: KtStringTemplateExpression at (1,11-32)
@@ -0,0 +1,8 @@
// IGNORE_FIR
// In FIR, there is currently a mismatch between the file's diagnostics and the individual elements' diagnostics, so we have to disable the
// FIR test. It will be fixed by KT-63221.
@Suppress("MUST_BE_INITIALIZED")
val foo: Int
val bar: String
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtStringTemplateExpression at (1,11-32)
ERROR_SUPPRESSION text ranges: [(10,31)]
PSI: KtStringTemplateExpression at (1,11-32)