Add a test for KT-54318
This commit is contained in:
+6
@@ -4793,6 +4793,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/casts/kt53677.kt");
|
runTest("compiler/testData/codegen/box/casts/kt53677.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt54318.kt")
|
||||||
|
public void testKt54318() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/casts/kt54318.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("lambdaToUnitCast.kt")
|
@TestMetadata("lambdaToUnitCast.kt")
|
||||||
public void testLambdaToUnitCast() throws Exception {
|
public void testLambdaToUnitCast() throws Exception {
|
||||||
|
|||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
// TARGET_BACKEND: JVM_IR
|
||||||
|
|
||||||
|
fun f(b: Int): Long? {
|
||||||
|
return try {
|
||||||
|
null
|
||||||
|
} catch (e: Throwable) {
|
||||||
|
if (b == 0)
|
||||||
|
throw e
|
||||||
|
else {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
f(0)
|
||||||
|
f(1)
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+6
@@ -4793,6 +4793,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/casts/kt53677.kt");
|
runTest("compiler/testData/codegen/box/casts/kt53677.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt54318.kt")
|
||||||
|
public void testKt54318() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/casts/kt54318.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("lambdaToUnitCast.kt")
|
@TestMetadata("lambdaToUnitCast.kt")
|
||||||
public void testLambdaToUnitCast() throws Exception {
|
public void testLambdaToUnitCast() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user