Do not generate Throws attribute for delegated members from Kotlin interfaces

#KT-31763 Fixed
 #KT-35834
This commit is contained in:
Alexander Udalov
2020-01-08 17:59:37 +01:00
parent 79d7335b8d
commit 621936e951
19 changed files with 294 additions and 18 deletions
@@ -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)