[FE 1.0] Support loading rxjava3 nullability annotations on bounded wildcards
^KT-53041 Fixed
This commit is contained in:
committed by
teamcity
parent
9f72193d57
commit
cb2dbca0c3
+26
@@ -27847,6 +27847,32 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/javaInterop/unresolvedJavaClassInDifferentFile.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ForeignAnnotationsTests {
|
||||
@Test
|
||||
public void testAllFilesPresentInForeignAnnotationsTests() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Tests {
|
||||
@Test
|
||||
public void testAllFilesPresentInTests() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt53041.kt")
|
||||
public void testKt53041() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests/kt53041.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/generics")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// FIR_IDENTICAL
|
||||
// JVM_TARGET: 1.8
|
||||
// NULLABILITY_ANNOTATIONS: @io.reactivex.rxjava3.annotations:strict
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
// FILE: MyBiConsumer.java
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface MyBiConsumer<@NonNull T> {
|
||||
void accept(T t);
|
||||
}
|
||||
|
||||
// FILE: MyMaybe.java
|
||||
import io.reactivex.rxjava3.annotations.Nullable;
|
||||
|
||||
public class MyMaybe {
|
||||
public static void doOnEvent(MyBiConsumer<@Nullable ? super Throwable> onEvent) {
|
||||
onEvent.accept(null);
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun box(): String {
|
||||
MyMaybe.doOnEvent { _ -> }
|
||||
return "OK"
|
||||
}
|
||||
+26
@@ -27283,6 +27283,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/unresolvedJavaClassInDifferentFile.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ForeignAnnotationsTests {
|
||||
@Test
|
||||
public void testAllFilesPresentInForeignAnnotationsTests() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Tests {
|
||||
@Test
|
||||
public void testAllFilesPresentInTests() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt53041.kt")
|
||||
public void testKt53041() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests/kt53041.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/generics")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+26
@@ -27847,6 +27847,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/javaInterop/unresolvedJavaClassInDifferentFile.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ForeignAnnotationsTests {
|
||||
@Test
|
||||
public void testAllFilesPresentInForeignAnnotationsTests() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Tests {
|
||||
@Test
|
||||
public void testAllFilesPresentInTests() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt53041.kt")
|
||||
public void testKt53041() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests/kt53041.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/generics")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+31
@@ -23032,6 +23032,37 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/javaInterop/unresolvedJavaClassInDifferentFile.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ForeignAnnotationsTests extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInForeignAnnotationsTests() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Tests extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInTests() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt53041.kt")
|
||||
public void testKt53041() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/foreignAnnotationsTests/tests/kt53041.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/javaInterop/generics")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user