[LL FIR] add test for 'for' on top level in script

^KT-61260
This commit is contained in:
Dmitrii Gridin
2023-08-16 17:10:53 +02:00
committed by Space Team
parent ae85c7bfe3
commit 1a21affe1d
3 changed files with 13 additions and 0 deletions
@@ -0,0 +1,3 @@
for ((index, _) in emptyList<Int>().withIndex()) {
}
@@ -0,0 +1,4 @@
/* anchor --> */for (/* anchor --> */(index, _)/* <-- */ in emptyList<Int>().withIndex()) {
}
/* <-- */
@@ -41,4 +41,10 @@ public class ScriptNonLocalDeclarationAnchorTestGenerated extends AbstractScript
public void testStatements() throws Exception {
runTest("analysis/low-level-api-fir/testdata/nonLocalDeclarationAnchors/statements.kts");
}
@Test
@TestMetadata("topLevelFor.kts")
public void testTopLevelFor() throws Exception {
runTest("analysis/low-level-api-fir/testdata/nonLocalDeclarationAnchors/topLevelFor.kts");
}
}