[JVM IR] Do not insert Nothing handling in JvmStatic wrapper.
Fixes KT-46568.
This commit is contained in:
committed by
Alexander Udalov
parent
3532ce7fbc
commit
3db5ba98ad
+6
@@ -24232,6 +24232,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt45408.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt9897_static.kt")
|
||||
public void testKt9897_static() throws Exception {
|
||||
|
||||
+1
@@ -144,6 +144,7 @@ private fun IrFunction.isStaticInlineClassReplacementDelegatingCall(): Boolean =
|
||||
|
||||
private val BRIDGE_ORIGINS = setOf(
|
||||
IrDeclarationOrigin.FUNCTION_FOR_DEFAULT_PARAMETER,
|
||||
JvmLoweredDeclarationOrigin.JVM_STATIC_WRAPPER,
|
||||
JvmLoweredDeclarationOrigin.JVM_OVERLOADS_WRAPPER,
|
||||
JvmLoweredDeclarationOrigin.SYNTHETIC_ACCESSOR,
|
||||
JvmLoweredDeclarationOrigin.SYNTHETIC_ACCESSOR_FOR_HIDDEN_CONSTRUCTOR,
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
abstract class Foo {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun bar(): Nothing = TODO()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
Foo.bar()
|
||||
} catch (e: Throwable) {
|
||||
return "OK"
|
||||
}
|
||||
return "FAIL"
|
||||
}
|
||||
+6
@@ -24208,6 +24208,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt45408.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt9897_static.kt")
|
||||
public void testKt9897_static() throws Exception {
|
||||
|
||||
+6
@@ -24232,6 +24232,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt45408.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt9897_static.kt")
|
||||
public void testKt9897_static() throws Exception {
|
||||
|
||||
+5
@@ -20406,6 +20406,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt45408.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt9897_static.kt")
|
||||
public void testKt9897_static() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt9897_static.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -15960,6 +15960,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/jvmStatic/protectedInSuperClass")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+5
@@ -15371,6 +15371,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/jvmStatic/protectedInSuperClass")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+5
@@ -15436,6 +15436,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/jvmStatic/protectedInSuperClass")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+5
@@ -9181,6 +9181,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/jvmStatic/protectedInSuperClass")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user