[Tests] Reproduce #KT-65193
This commit is contained in:
committed by
Space Team
parent
ffef1630dd
commit
19cc739118
+6
@@ -234,6 +234,12 @@ public class FirPsiOldFrontendForeignAnnotationsCompiledJavaTestGenerated extend
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/expressionBodiedFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt65193.kt")
|
||||
public void testKt65193() {
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/kt65193.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localInference.kt")
|
||||
public void testLocalInference() {
|
||||
|
||||
+6
@@ -292,6 +292,12 @@ public class FirPsiOldFrontendForeignAnnotationsCompiledJavaWithPsiClassReadingT
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/expressionBodiedFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt65193.kt")
|
||||
public void testKt65193() {
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/kt65193.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localInference.kt")
|
||||
public void testLocalInference() {
|
||||
|
||||
+6
@@ -292,6 +292,12 @@ public class FirPsiOldFrontendForeignAnnotationsSourceJavaTestGenerated extends
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/expressionBodiedFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt65193.kt")
|
||||
public void testKt65193() {
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/kt65193.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localInference.kt")
|
||||
public void testLocalInference() {
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
// FILE: test/NonNullApi.java
|
||||
package test;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.meta.TypeQualifierDefault;
|
||||
|
||||
@Target(ElementType.PACKAGE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Nonnull
|
||||
@TypeQualifierDefault({ElementType.METHOD, ElementType.PARAMETER, ElementType.PACKAGE})
|
||||
public @interface NonNullApi {
|
||||
}
|
||||
|
||||
// FILE: test/package-info.java
|
||||
@NonNullApi
|
||||
package test;
|
||||
|
||||
// FILE: test/JpaSpecificationExecutor.java
|
||||
package test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface JpaSpecificationExecutor<T> {
|
||||
List<T> findAll();
|
||||
}
|
||||
|
||||
// FILE: mockito/OngoingStubbing.java
|
||||
package mockito;
|
||||
|
||||
public interface OngoingStubbing<T> {
|
||||
OngoingStubbing<T> thenReturn(T var1);
|
||||
|
||||
public static <T> OngoingStubbing<T> when(T... methodCall) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: test.kt
|
||||
package test
|
||||
|
||||
import mockito.OngoingStubbing
|
||||
|
||||
fun test(wrapper: JpaSpecificationExecutor<String>, l: List<String>, l2: List<Int>) {
|
||||
OngoingStubbing.`when`(wrapper.findAll()).thenReturn(<!NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS!>l<!>)
|
||||
OngoingStubbing.`when`(wrapper.findAll(), l2).thenReturn(l)
|
||||
}
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
// FILE: test/NonNullApi.java
|
||||
package test;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.meta.TypeQualifierDefault;
|
||||
|
||||
@Target(ElementType.PACKAGE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Nonnull
|
||||
@TypeQualifierDefault({ElementType.METHOD, ElementType.PARAMETER, ElementType.PACKAGE})
|
||||
public @interface NonNullApi {
|
||||
}
|
||||
|
||||
// FILE: test/package-info.java
|
||||
@NonNullApi
|
||||
package test;
|
||||
|
||||
// FILE: test/JpaSpecificationExecutor.java
|
||||
package test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface JpaSpecificationExecutor<T> {
|
||||
List<T> findAll();
|
||||
}
|
||||
|
||||
// FILE: mockito/OngoingStubbing.java
|
||||
package mockito;
|
||||
|
||||
public interface OngoingStubbing<T> {
|
||||
OngoingStubbing<T> thenReturn(T var1);
|
||||
|
||||
public static <T> OngoingStubbing<T> when(T... methodCall) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: test.kt
|
||||
package test
|
||||
|
||||
import mockito.OngoingStubbing
|
||||
|
||||
fun test(wrapper: JpaSpecificationExecutor<String>, l: List<String>, l2: List<Int>) {
|
||||
OngoingStubbing.`when`(wrapper.findAll()).thenReturn(l)
|
||||
OngoingStubbing.`when`(wrapper.findAll(), l2).thenReturn(l)
|
||||
}
|
||||
+6
@@ -234,6 +234,12 @@ public class ForeignAnnotationsCompiledJavaTestGenerated extends AbstractForeign
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/expressionBodiedFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt65193.kt")
|
||||
public void testKt65193() {
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/kt65193.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localInference.kt")
|
||||
public void testLocalInference() {
|
||||
|
||||
+6
@@ -292,6 +292,12 @@ public class ForeignAnnotationsCompiledJavaWithPsiClassReadingTestGenerated exte
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/expressionBodiedFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt65193.kt")
|
||||
public void testKt65193() {
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/kt65193.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localInference.kt")
|
||||
public void testLocalInference() {
|
||||
|
||||
+6
@@ -292,6 +292,12 @@ public class ForeignAnnotationsSourceJavaTestGenerated extends AbstractForeignAn
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/expressionBodiedFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt65193.kt")
|
||||
public void testKt65193() {
|
||||
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/tests/jsr305/nullabilityWarnings/kt65193.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localInference.kt")
|
||||
public void testLocalInference() {
|
||||
|
||||
Reference in New Issue
Block a user