Fix test and unmute it for JVM
This commit is contained in:
committed by
teamcityserver
parent
d48557ed53
commit
3bef04cf5e
@@ -1,18 +1,16 @@
|
|||||||
// !LANGUAGE: +DefinitelyNonNullableTypes
|
// !LANGUAGE: +DefinitelyNonNullableTypes
|
||||||
// IGNORE_BACKEND: JVM
|
|
||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
// IGNORE_BACKEND: JS
|
// IGNORE_BACKEND: JS
|
||||||
// IGNORE_BACKEND: JS_IR
|
// IGNORE_BACKEND: JS_IR
|
||||||
|
// IGNORE_BACKEND: WASM
|
||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
// FIR status: not supported in JVM
|
// FIR status: not supported in JVM
|
||||||
|
|
||||||
fun <T> test(t: T) = t as (T & Any)
|
fun <T> test(t: T) = t as (T & Any)
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String =
|
||||||
try {
|
try {
|
||||||
test<Any?>(null)
|
test<Any?>(null)
|
||||||
|
"FAIL: expected NPE"
|
||||||
} catch (ex: NullPointerException) {
|
} catch (ex: NullPointerException) {
|
||||||
return "FAIL: expected NPE"
|
test("OK")
|
||||||
}
|
}
|
||||||
return test("OK")
|
|
||||||
}
|
|
||||||
+5
-5
@@ -3701,11 +3701,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Casts extends AbstractLightAnalysisModeTest {
|
public static class Casts extends AbstractLightAnalysisModeTest {
|
||||||
@TestMetadata("castToDefinitelyNotNullType.kt")
|
|
||||||
public void ignoreCastToDefinitelyNotNullType() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/casts/castToDefinitelyNotNullType.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||||
}
|
}
|
||||||
@@ -3759,6 +3754,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/casts/castGenericNull.kt");
|
runTest("compiler/testData/codegen/box/casts/castGenericNull.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("castToDefinitelyNotNullType.kt")
|
||||||
|
public void testCastToDefinitelyNotNullType() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/casts/castToDefinitelyNotNullType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("dontCreateInconsistentTypeDuringStarProjectionSubstitution.kt")
|
@TestMetadata("dontCreateInconsistentTypeDuringStarProjectionSubstitution.kt")
|
||||||
public void testDontCreateInconsistentTypeDuringStarProjectionSubstitution() throws Exception {
|
public void testDontCreateInconsistentTypeDuringStarProjectionSubstitution() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/casts/dontCreateInconsistentTypeDuringStarProjectionSubstitution.kt");
|
runTest("compiler/testData/codegen/box/casts/dontCreateInconsistentTypeDuringStarProjectionSubstitution.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user