Preserve type annotations on type parameter when substituting

Subsitute(@A T, T:@B String) = @B @A String

Nullability when loading Java:
Subsitute(@NotNull T, T:String) = @NotNull String
Subsitute(@NotNull T, T:String!) = @NotNull String
Subsitute(@NotNull T, T:String?) = @NotNull String

Subsitute(@Nullable T, T:String) = @Nullable String?
Subsitute(@Nullable T, T:String!) = @Nullable String?
Subsitute(@Nullable T, T:String?) = @Nullable String?
This commit is contained in:
Denis Zharkov
2015-07-14 14:20:39 +03:00
parent 2b541a560e
commit e23c7f457b
11 changed files with 128 additions and 10 deletions
@@ -10463,6 +10463,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("saveAnnotationAfterSubstitution.kt")
public void testSaveAnnotationAfterSubstitution() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.kt");
doTest(fileName);
}
@TestMetadata("supertypeDifferentParameterNullability.kt")
public void testSupertypeDifferentParameterNullability() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/supertypeDifferentParameterNullability.kt");