Do not generate Throws attribute for delegated members from Kotlin interfaces
#KT-31763 Fixed #KT-35834
This commit is contained in:
+18
@@ -1034,6 +1034,24 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxAgainstJava/throws")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Throws extends AbstractBlackBoxAgainstJavaCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInThrows() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/throws"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndThrows.kt")
|
||||
public void testDelegationAndThrows() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxAgainstJava/typealias")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+23
@@ -27658,6 +27658,29 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/throws")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Throws extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInThrows() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndThrows.kt")
|
||||
public void testDelegationAndThrows() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/throws/delegationAndThrows.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndThrows_1_3.kt")
|
||||
public void testDelegationAndThrows_1_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/throws/delegationAndThrows_1_3.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/toArray")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+5
@@ -123,6 +123,11 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
|
||||
runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndAnnotations.kt")
|
||||
public void testDelegationAndAnnotations() throws Exception {
|
||||
runTest("compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("doublyNestedClass.kt")
|
||||
public void testDoublyNestedClass() throws Exception {
|
||||
runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt");
|
||||
|
||||
+23
@@ -26475,6 +26475,29 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/throws")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Throws extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInThrows() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndThrows.kt")
|
||||
public void testDelegationAndThrows() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/throws/delegationAndThrows.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndThrows_1_3.kt")
|
||||
public void testDelegationAndThrows_1_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/throws/delegationAndThrows_1_3.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/toArray")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+23
@@ -26157,6 +26157,29 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/throws")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Throws extends AbstractFirBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInThrows() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndThrows.kt")
|
||||
public void testDelegationAndThrows() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/throws/delegationAndThrows.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndThrows_1_3.kt")
|
||||
public void testDelegationAndThrows_1_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/throws/delegationAndThrows_1_3.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/toArray")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+18
@@ -1035,6 +1035,24 @@ public class IrBlackBoxAgainstJavaCodegenTestGenerated extends AbstractIrBlackBo
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxAgainstJava/throws")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Throws extends AbstractIrBlackBoxAgainstJavaCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInThrows() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndThrows.kt")
|
||||
public void testDelegationAndThrows() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxAgainstJava/typealias")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+23
@@ -26157,6 +26157,29 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/throws")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Throws extends AbstractIrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInThrows() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndThrows.kt")
|
||||
public void testDelegationAndThrows() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/throws/delegationAndThrows.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndThrows_1_3.kt")
|
||||
public void testDelegationAndThrows_1_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/throws/delegationAndThrows_1_3.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/toArray")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+5
@@ -118,6 +118,11 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile
|
||||
runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationAndAnnotations.kt")
|
||||
public void testDelegationAndAnnotations() throws Exception {
|
||||
runTest("compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("doublyNestedClass.kt")
|
||||
public void testDoublyNestedClass() throws Exception {
|
||||
runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt");
|
||||
|
||||
Reference in New Issue
Block a user