K2: reproduce a problem from intellij.vcs.git
This commit is contained in:
committed by
Space Team
parent
e701a16460
commit
c966533d73
+6
@@ -22894,6 +22894,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/UnboxingNulls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("withTestConnection.kt")
|
||||
public void testWithTestConnection() {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/withTestConnection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wrongVarianceInJava.kt")
|
||||
public void testWrongVarianceInJava() {
|
||||
|
||||
+6
@@ -22894,6 +22894,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/UnboxingNulls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("withTestConnection.kt")
|
||||
public void testWithTestConnection() {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/withTestConnection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wrongVarianceInJava.kt")
|
||||
public void testWrongVarianceInJava() {
|
||||
|
||||
+6
@@ -22888,6 +22888,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/UnboxingNulls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("withTestConnection.kt")
|
||||
public void testWithTestConnection() {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/withTestConnection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wrongVarianceInJava.kt")
|
||||
public void testWrongVarianceInJava() {
|
||||
|
||||
+6
@@ -22894,6 +22894,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/UnboxingNulls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("withTestConnection.kt")
|
||||
public void testWithTestConnection() {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/withTestConnection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wrongVarianceInJava.kt")
|
||||
public void testWrongVarianceInJava() {
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun waitTestConnection(configurable: A) {
|
||||
val res = configurable.test()
|
||||
<!NEW_INFERENCE_ERROR!>C.wait(res!!.toFuture())<!>
|
||||
}
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
public interface A {
|
||||
@Nullable B<?> test();
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
|
||||
import java.util.concurrent.CompletableFuture
|
||||
|
||||
abstract class B<S> {
|
||||
abstract fun toFuture(): CompletableFuture<S>
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
public class C {
|
||||
public static <F> F wait(Future<F> future) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun waitTestConnection(configurable: A) {
|
||||
val res = configurable.test()
|
||||
C.wait(res!!.toFuture())
|
||||
}
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
public interface A {
|
||||
@Nullable B<?> test();
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
|
||||
import java.util.concurrent.CompletableFuture
|
||||
|
||||
abstract class B<S> {
|
||||
abstract fun toFuture(): CompletableFuture<S>
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
public class C {
|
||||
public static <F> F wait(Future<F> future) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Generated
+6
@@ -22894,6 +22894,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/UnboxingNulls.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("withTestConnection.kt")
|
||||
public void testWithTestConnection() {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/withTestConnection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wrongVarianceInJava.kt")
|
||||
public void testWrongVarianceInJava() {
|
||||
|
||||
Reference in New Issue
Block a user