Write additional type parameters for DefaultImpls methods, fix for KT-11121: BadClassFile exception for interface implemented generic properties

#KT-11121 Fixed
This commit is contained in:
Michael Bogdanov
2016-02-29 14:39:49 +03:00
parent 5aca50b4ca
commit 534a3a11d6
10 changed files with 240 additions and 29 deletions
@@ -601,6 +601,12 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
doTest(fileName);
}
@TestMetadata("defaultImplsGenericSignature.kt")
public void testDefaultImplsGenericSignature() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/defaultImplsGenericSignature.kt");
doTest(fileName);
}
@TestMetadata("functionReferenceErasedToKFunction.kt")
public void testFunctionReferenceErasedToKFunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction.kt");
@@ -3819,6 +3819,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
doTestWithStdlib(fileName);
}
@TestMetadata("kt11121.kt")
public void testKt11121() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt11121.kt");
doTestWithStdlib(fileName);
}
@TestMetadata("kt5112.kt")
public void testKt5112() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/genericSignature/kt5112.kt");
@@ -482,6 +482,33 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest {
}
}
@TestMetadata("compiler/testData/writeSignature/defaultImpls")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DefaultImpls extends AbstractWriteSignatureTest {
public void testAllFilesPresentInDefaultImpls() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/defaultImpls"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("functionTypeParameterClash.kt")
public void testFunctionTypeParameterClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/defaultImpls/functionTypeParameterClash.kt");
doTest(fileName);
}
@TestMetadata("functionTypeParameterClashWith_I.kt")
public void testFunctionTypeParameterClashWith_I() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/defaultImpls/functionTypeParameterClashWith_I.kt");
doTest(fileName);
}
@TestMetadata("propertyTypeParameterClash.kt")
public void testPropertyTypeParameterClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/defaultImpls/propertyTypeParameterClash.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/writeSignature/nothing")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)