diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java index 970e86784f1..ffdf635388e 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java @@ -30708,6 +30708,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/testsWithStdLib/elvisOnUnitInLet.kt"); } + @Test + @TestMetadata("exitProcess.kt") + public void testExitProcess() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt"); + } + @Test @TestMetadata("hugeUnresolvedKotlinxHtml.kt") public void testHugeUnresolvedKotlinxHtml() throws Exception { diff --git a/compiler/testData/diagnostics/testsWithStdLib/exitProcess.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/exitProcess.fir.kt new file mode 100644 index 00000000000..b3359c0135a --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/exitProcess.fir.kt @@ -0,0 +1,14 @@ +import java.io.File +import kotlin.system.exitProcess + +object Main { + private val KOTLIN_HOME: File + + init { + val home = System.getProperty("kotlin.home") + if (home == null) { + exitProcess(1) + } + KOTLIN_HOME = File(home) + } +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt b/compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt new file mode 100644 index 00000000000..65688ab47ca --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt @@ -0,0 +1,14 @@ +import java.io.File +import kotlin.system.exitProcess + +object Main { + private val KOTLIN_HOME: File + + init { + val home = System.getProperty("kotlin.home") + if (home == null) { + exitProcess(1) + } + KOTLIN_HOME = File(home) + } +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/exitProcess.txt b/compiler/testData/diagnostics/testsWithStdLib/exitProcess.txt new file mode 100644 index 00000000000..1c779edba53 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/exitProcess.txt @@ -0,0 +1,9 @@ +package + +public object Main { + private constructor Main() + private final val KOTLIN_HOME: java.io.File + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index 7cc3919e5a6..024521410d2 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -30804,6 +30804,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/testsWithStdLib/elvisOnUnitInLet.kt"); } + @Test + @TestMetadata("exitProcess.kt") + public void testExitProcess() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt"); + } + @Test @TestMetadata("hugeUnresolvedKotlinxHtml.kt") public void testHugeUnresolvedKotlinxHtml() throws Exception {