Minor, add box test for unreachable uninitialized property
#KT-44496
This commit is contained in:
+6
@@ -27512,6 +27512,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unreachableUninitializedProperty.kt")
|
||||
public void testUnreachableUninitializedProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/unreachableUninitializedProperty.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/properties/const")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
|
||||
// WITH_RUNTIME
|
||||
// KT-44496
|
||||
|
||||
class C {
|
||||
val todo: String = TODO()
|
||||
|
||||
val uninitializedVal: String
|
||||
|
||||
var uninitializedVar: String
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
try {
|
||||
C()
|
||||
"Fail"
|
||||
} catch (e: NotImplementedError) {
|
||||
"OK"
|
||||
}
|
||||
+6
@@ -27512,6 +27512,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unreachableUninitializedProperty.kt")
|
||||
public void testUnreachableUninitializedProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/unreachableUninitializedProperty.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/properties/const")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+6
@@ -27512,6 +27512,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unreachableUninitializedProperty.kt")
|
||||
public void testUnreachableUninitializedProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/unreachableUninitializedProperty.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/properties/const")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+5
@@ -23402,6 +23402,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unreachableUninitializedProperty.kt")
|
||||
public void testUnreachableUninitializedProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/unreachableUninitializedProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/properties/const")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -18645,6 +18645,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unreachableUninitializedProperty.kt")
|
||||
public void testUnreachableUninitializedProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/unreachableUninitializedProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/properties/const")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+5
@@ -18102,6 +18102,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unreachableUninitializedProperty.kt")
|
||||
public void testUnreachableUninitializedProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/unreachableUninitializedProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/properties/const")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+5
@@ -18152,6 +18152,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unreachableUninitializedProperty.kt")
|
||||
public void testUnreachableUninitializedProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/unreachableUninitializedProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/properties/const")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+5
@@ -11624,6 +11624,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unreachableUninitializedProperty.kt")
|
||||
public void testUnreachableUninitializedProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/properties/unreachableUninitializedProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/properties/const")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user