Reproduce KT-45327: false positive MUST_INITIALIZED_OR_BE_ABSTRACT after conditional exitProcess
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
628d75c7cd
commit
d8fb54c6bd
+6
@@ -30708,6 +30708,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/elvisOnUnitInLet.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/elvisOnUnitInLet.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("exitProcess.kt")
|
||||||
|
public void testExitProcess() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("hugeUnresolvedKotlinxHtml.kt")
|
@TestMetadata("hugeUnresolvedKotlinxHtml.kt")
|
||||||
public void testHugeUnresolvedKotlinxHtml() throws Exception {
|
public void testHugeUnresolvedKotlinxHtml() throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import java.io.File
|
||||||
|
import kotlin.system.exitProcess
|
||||||
|
|
||||||
|
object Main {
|
||||||
|
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>private val KOTLIN_HOME: File<!>
|
||||||
|
|
||||||
|
init {
|
||||||
|
val home = System.getProperty("kotlin.home")
|
||||||
|
if (home == null) {
|
||||||
|
exitProcess(1)
|
||||||
|
}
|
||||||
|
KOTLIN_HOME = File(home)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
Generated
+6
@@ -30804,6 +30804,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/elvisOnUnitInLet.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/elvisOnUnitInLet.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("exitProcess.kt")
|
||||||
|
public void testExitProcess() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("hugeUnresolvedKotlinxHtml.kt")
|
@TestMetadata("hugeUnresolvedKotlinxHtml.kt")
|
||||||
public void testHugeUnresolvedKotlinxHtml() throws Exception {
|
public void testHugeUnresolvedKotlinxHtml() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user