Add test for enhancement in usages of annotated type parameter

This commit is contained in:
Victor Petukhov
2021-05-12 20:31:27 +03:00
parent fd6475c804
commit cba221c18a
4 changed files with 32 additions and 0 deletions
@@ -0,0 +1,14 @@
// SKIP_TXT
// MUTE_FOR_PSI_CLASS_FILES_READING
import org.jetbrains.annotations.*;
// FILE: MapLike.java
public interface MapLike<@org.jetbrains.annotations.NotNull K> {
void put(K x);
}
// FILE: main.kt
fun test2(map : MapLike<Int>, x2: Int?) {
map.put(<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>x2<!>)
}
@@ -1015,6 +1015,12 @@ public class ForeignAnnotationsCompiledJavaTestGenerated extends AbstractForeign
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/simple.fir.kt");
}
@Test
@TestMetadata("useTypeParameterAnnotationToEnhanceItsUsages.kt")
public void testUseTypeParameterAnnotationToEnhanceItsUsages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/useTypeParameterAnnotationToEnhanceItsUsages.kt");
}
@Test
@TestMetadata("valueParameter.kt")
public void testValueParameter() throws Exception {
@@ -1015,6 +1015,12 @@ public class ForeignAnnotationsCompiledJavaWithPsiClassReadingTestGenerated exte
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/simple.fir.kt");
}
@Test
@TestMetadata("useTypeParameterAnnotationToEnhanceItsUsages.kt")
public void testUseTypeParameterAnnotationToEnhanceItsUsages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/useTypeParameterAnnotationToEnhanceItsUsages.kt");
}
@Test
@TestMetadata("valueParameter.kt")
public void testValueParameter() throws Exception {
@@ -1015,6 +1015,12 @@ public class ForeignAnnotationsSourceJavaTestGenerated extends AbstractForeignAn
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/simple.fir.kt");
}
@Test
@TestMetadata("useTypeParameterAnnotationToEnhanceItsUsages.kt")
public void testUseTypeParameterAnnotationToEnhanceItsUsages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/useTypeParameterAnnotationToEnhanceItsUsages.kt");
}
@Test
@TestMetadata("valueParameter.kt")
public void testValueParameter() throws Exception {