diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index cd83bfa6e9e..0715b056d60 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -51628,6 +51628,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo runTest("compiler/testData/codegen/box/script/localCaptureTests.kt"); } + @Test + @TestMetadata("localCaptureTestsK2.kt") + public void testLocalCaptureTestsK2() throws Exception { + runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt"); + } + @Test @TestMetadata("scripInstance.kt") public void testScripInstance() throws Exception { @@ -51639,6 +51645,18 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo public void testScriptNestedClassInstance() throws Exception { runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt"); } + + @Test + @TestMetadata("scriptNestedClassInstanceK2.kt") + public void testScriptNestedClassInstanceK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt"); + } + + @Test + @TestMetadata("scriptPropFromAnotherModuleK2.kt") + public void testScriptPropFromAnotherModuleK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt"); + } } @Nested diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index 04dc3aaaaf3..c3b23c76b54 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -51628,6 +51628,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi runTest("compiler/testData/codegen/box/script/localCaptureTests.kt"); } + @Test + @TestMetadata("localCaptureTestsK2.kt") + public void testLocalCaptureTestsK2() throws Exception { + runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt"); + } + @Test @TestMetadata("scripInstance.kt") public void testScripInstance() throws Exception { @@ -51639,6 +51645,18 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi public void testScriptNestedClassInstance() throws Exception { runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt"); } + + @Test + @TestMetadata("scriptNestedClassInstanceK2.kt") + public void testScriptNestedClassInstanceK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt"); + } + + @Test + @TestMetadata("scriptPropFromAnotherModuleK2.kt") + public void testScriptPropFromAnotherModuleK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt"); + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 6625edd159f..8ac357f5985 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -51133,6 +51133,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/script/localCaptureTests.kt"); } + @Test + @TestMetadata("localCaptureTestsK2.kt") + public void testLocalCaptureTestsK2() throws Exception { + runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt"); + } + @Test @TestMetadata("scripInstance.kt") public void testScripInstance() throws Exception { @@ -51144,6 +51150,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr public void testScriptNestedClassInstance() throws Exception { runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt"); } + + @Test + @TestMetadata("scriptNestedClassInstanceK2.kt") + public void testScriptNestedClassInstanceK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt"); + } + + @Test + @TestMetadata("scriptPropFromAnotherModuleK2.kt") + public void testScriptPropFromAnotherModuleK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt"); + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index 550dc2fe38d..3a4d379ed47 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -51133,6 +51133,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated runTest("compiler/testData/codegen/box/script/localCaptureTests.kt"); } + @Test + @TestMetadata("localCaptureTestsK2.kt") + public void testLocalCaptureTestsK2() throws Exception { + runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt"); + } + @Test @TestMetadata("scripInstance.kt") public void testScripInstance() throws Exception { @@ -51144,6 +51150,18 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated public void testScriptNestedClassInstance() throws Exception { runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt"); } + + @Test + @TestMetadata("scriptNestedClassInstanceK2.kt") + public void testScriptNestedClassInstanceK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt"); + } + + @Test + @TestMetadata("scriptPropFromAnotherModuleK2.kt") + public void testScriptPropFromAnotherModuleK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt"); + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index a937b8f689f..5a3004e9912 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -51133,6 +51133,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/script/localCaptureTests.kt"); } + @Test + @TestMetadata("localCaptureTestsK2.kt") + public void testLocalCaptureTestsK2() throws Exception { + runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt"); + } + @Test @TestMetadata("scripInstance.kt") public void testScripInstance() throws Exception { @@ -51144,6 +51150,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo public void testScriptNestedClassInstance() throws Exception { runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt"); } + + @Test + @TestMetadata("scriptNestedClassInstanceK2.kt") + public void testScriptNestedClassInstanceK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt"); + } + + @Test + @TestMetadata("scriptPropFromAnotherModuleK2.kt") + public void testScriptPropFromAnotherModuleK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt"); + } } @Nested diff --git a/compiler/testData/codegen/box/script/classReference.kt b/compiler/testData/codegen/box/script/classReference.kt index b9c20f90ef7..84b4b4af1d6 100644 --- a/compiler/testData/codegen/box/script/classReference.kt +++ b/compiler/testData/codegen/box/script/classReference.kt @@ -1,6 +1,6 @@ // TARGET_BACKEND: JVM // IGNORE_BACKEND_K2: JVM_IR, JS_IR, JS_IR_ES6 -// FIR status: scripts aren't supported yet +// FIR status: script declarations are not visible from other sources // IGNORE_LIGHT_ANALYSIS // WITH_STDLIB // FILE: test.kt diff --git a/compiler/testData/codegen/box/script/localCaptureTests.kt b/compiler/testData/codegen/box/script/localCaptureTests.kt index 894ee557461..6be3425473c 100644 --- a/compiler/testData/codegen/box/script/localCaptureTests.kt +++ b/compiler/testData/codegen/box/script/localCaptureTests.kt @@ -1,6 +1,6 @@ // TARGET_BACKEND: JVM // IGNORE_BACKEND_K2: JVM_IR, JS_IR, JS_IR_ES6 -// FIR status: scripts aren't supported yet +// FIR status: script declarations are not visible from other sources // IGNORE_LIGHT_ANALYSIS // WITH_STDLIB // FILE: test.kt diff --git a/compiler/testData/codegen/box/script/localCaptureTestsK2.kt b/compiler/testData/codegen/box/script/localCaptureTestsK2.kt new file mode 100644 index 00000000000..4fe926a1da9 --- /dev/null +++ b/compiler/testData/codegen/box/script/localCaptureTestsK2.kt @@ -0,0 +1,31 @@ +// TARGET_BACKEND: JVM +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS_IR, JS_IR_ES6 +// IGNORE_LIGHT_ANALYSIS +// WITH_STDLIB +// FILE: test.kt + +fun box(): String = + Build.Debug.run { "${c0()}${c1()}" } + +// FILE: script.kts + +interface Base { + val v: String + + fun c0(): Char { + fun getC0() = v[0] + return getC0() + } +} + +enum class Build(override val v: String): Base { + Debug("OK"), + Release("NO"); + + fun c1(): Char { + val g = object { + val c1 = v[1] + } + return g.c1 + } +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/script/scripInstance.kt b/compiler/testData/codegen/box/script/scripInstance.kt index 30e77e08c4d..9729aa557cf 100644 --- a/compiler/testData/codegen/box/script/scripInstance.kt +++ b/compiler/testData/codegen/box/script/scripInstance.kt @@ -1,6 +1,6 @@ // TARGET_BACKEND: JVM // IGNORE_BACKEND_K2: JVM_IR, JS_IR, JS_IR_ES6 -// FIR status: scripts aren't supported yet +// FIR status: script declarations are not visible from other sources // IGNORE_LIGHT_ANALYSIS // WITH_STDLIB // FILE: test.kt diff --git a/compiler/testData/codegen/box/script/scriptNestedClassInstance.kt b/compiler/testData/codegen/box/script/scriptNestedClassInstance.kt index e8ad069d93d..f1c04a5f737 100644 --- a/compiler/testData/codegen/box/script/scriptNestedClassInstance.kt +++ b/compiler/testData/codegen/box/script/scriptNestedClassInstance.kt @@ -1,6 +1,6 @@ // TARGET_BACKEND: JVM // IGNORE_BACKEND_K2: JVM_IR, JS_IR, JS_IR_ES6 -// FIR status: scripts aren't supported yet +// FIR status: script declarations are not visible from other sources // IGNORE_LIGHT_ANALYSIS // WITH_STDLIB // FILE: test.kt diff --git a/compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt b/compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt new file mode 100644 index 00000000000..779d51c1bd7 --- /dev/null +++ b/compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// IGNORE_BACKEND_K1: JVM, JVM_IR, JS_IR, JS_IR_ES6 +// IGNORE_LIGHT_ANALYSIS +// WITH_STDLIB +// FILE: test.kt + +fun box(): String = + Nested().x + +// FILE: script.kts + +class Nested { + val x = "OK" +} diff --git a/compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt b/compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt new file mode 100644 index 00000000000..7ae65919287 --- /dev/null +++ b/compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt @@ -0,0 +1,28 @@ +// TARGET_BACKEND: JVM_IR +// IGNORE_BACKEND_K1: JS_IR, JS_IR_ES6 +// IGNORE_LIGHT_ANALYSIS +// !LANGUAGE: -SkipStandaloneScriptsInSourceRoots +// WITH_STDLIB + +// Although this test works in K1 just fine, it is named with the suffix K2 to show that the demonstrated method is the only one +// available so far to call a script from another module. +// In K1 one can do it directly, but this is not the functionality we want to retain + +// MODULE: lib +// FILE: script.kts + +fun ok() = "OK" + +// MODULE: main(lib) +// FILE: test.kt + +fun runScriptMethod(name: String, method: String): Any { + val klass = Thread.currentThread().contextClassLoader.loadClass(name) + val constructor = klass.constructors.single() + val instance = constructor.newInstance(emptyArray()) + val method = klass.getMethod(method) + return method.invoke(instance) +} + +fun box(): String = + runScriptMethod("Script", "ok") as String diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java index 97a72dbf765..7223314c6af 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java @@ -50449,6 +50449,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency runTest("compiler/testData/codegen/box/script/localCaptureTests.kt"); } + @Test + @TestMetadata("localCaptureTestsK2.kt") + public void testLocalCaptureTestsK2() throws Exception { + runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt"); + } + @Test @TestMetadata("scripInstance.kt") public void testScripInstance() throws Exception { @@ -50460,6 +50466,18 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency public void testScriptNestedClassInstance() throws Exception { runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt"); } + + @Test + @TestMetadata("scriptNestedClassInstanceK2.kt") + public void testScriptNestedClassInstanceK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt"); + } + + @Test + @TestMetadata("scriptPropFromAnotherModuleK2.kt") + public void testScriptPropFromAnotherModuleK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 6a428853327..f70b3efb925 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -47479,6 +47479,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/script/localCaptureTests.kt"); } + @Test + @TestMetadata("localCaptureTestsK2.kt") + public void testLocalCaptureTestsK2() throws Exception { + runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt"); + } + @Test @TestMetadata("scripInstance.kt") public void testScripInstance() throws Exception { @@ -47490,6 +47496,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public void testScriptNestedClassInstance() throws Exception { runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt"); } + + @Test + @TestMetadata("scriptNestedClassInstanceK2.kt") + public void testScriptNestedClassInstanceK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 86662cbb7f2..c0384c726ad 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -50449,6 +50449,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/script/localCaptureTests.kt"); } + @Test + @TestMetadata("localCaptureTestsK2.kt") + public void testLocalCaptureTestsK2() throws Exception { + runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt"); + } + @Test @TestMetadata("scripInstance.kt") public void testScripInstance() throws Exception { @@ -50460,6 +50466,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public void testScriptNestedClassInstance() throws Exception { runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt"); } + + @Test + @TestMetadata("scriptNestedClassInstanceK2.kt") + public void testScriptNestedClassInstanceK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt"); + } + + @Test + @TestMetadata("scriptPropFromAnotherModuleK2.kt") + public void testScriptPropFromAnotherModuleK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt"); + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 050fecae51f..e94f422268a 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -50449,6 +50449,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/script/localCaptureTests.kt"); } + @Test + @TestMetadata("localCaptureTestsK2.kt") + public void testLocalCaptureTestsK2() throws Exception { + runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt"); + } + @Test @TestMetadata("scripInstance.kt") public void testScripInstance() throws Exception { @@ -50460,6 +50466,18 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack public void testScriptNestedClassInstance() throws Exception { runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt"); } + + @Test + @TestMetadata("scriptNestedClassInstanceK2.kt") + public void testScriptNestedClassInstanceK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt"); + } + + @Test + @TestMetadata("scriptPropFromAnotherModuleK2.kt") + public void testScriptPropFromAnotherModuleK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt"); + } } @Nested diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 65e2169d744..5545633f748 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -40552,6 +40552,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractLightAnalysisModeTest { + @TestMetadata("localCaptureTestsK2.kt") + public void ignoreLocalCaptureTestsK2() throws Exception { + runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt"); + } + + @TestMetadata("scriptNestedClassInstanceK2.kt") + public void ignoreScriptNestedClassInstanceK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); } @@ -40579,6 +40589,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public void testScriptNestedClassInstance() throws Exception { runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt"); } + + @TestMetadata("scriptPropFromAnotherModuleK2.kt") + public void testScriptPropFromAnotherModuleK2() throws Exception { + runTest("compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt"); + } } @TestMetadata("compiler/testData/codegen/box/sealed")