K1/K2: add test for Future.get case
This commit is contained in:
+6
@@ -22330,6 +22330,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/j+k/flexibleTypeVariablePosition.kt");
|
runTest("compiler/testData/diagnostics/tests/j+k/flexibleTypeVariablePosition.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("futureGet.kt")
|
||||||
|
public void testFutureGet() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/j+k/futureGet.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
||||||
public void testGenericConstructorWithMultipleBounds() {
|
public void testGenericConstructorWithMultipleBounds() {
|
||||||
|
|||||||
+6
@@ -22330,6 +22330,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/j+k/flexibleTypeVariablePosition.kt");
|
runTest("compiler/testData/diagnostics/tests/j+k/flexibleTypeVariablePosition.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("futureGet.kt")
|
||||||
|
public void testFutureGet() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/j+k/futureGet.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
||||||
public void testGenericConstructorWithMultipleBounds() {
|
public void testGenericConstructorWithMultipleBounds() {
|
||||||
|
|||||||
+6
@@ -22324,6 +22324,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/j+k/flexibleTypeVariablePosition.kt");
|
runTest("compiler/testData/diagnostics/tests/j+k/flexibleTypeVariablePosition.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("futureGet.kt")
|
||||||
|
public void testFutureGet() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/j+k/futureGet.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
||||||
public void testGenericConstructorWithMultipleBounds() {
|
public void testGenericConstructorWithMultipleBounds() {
|
||||||
|
|||||||
+6
@@ -22330,6 +22330,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/j+k/flexibleTypeVariablePosition.kt");
|
runTest("compiler/testData/diagnostics/tests/j+k/flexibleTypeVariablePosition.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("futureGet.kt")
|
||||||
|
public void testFutureGet() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/j+k/futureGet.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
||||||
public void testGenericConstructorWithMultipleBounds() {
|
public void testGenericConstructorWithMultipleBounds() {
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// FULL_JDK
|
||||||
|
// JVM_TARGET: 1.8
|
||||||
|
|
||||||
|
import java.util.concurrent.Future
|
||||||
|
import java.util.concurrent.atomic.AtomicReference
|
||||||
|
|
||||||
|
fun foo(future: Future<String?>) {
|
||||||
|
future.get()<!UNSAFE_CALL!>.<!>length
|
||||||
|
}
|
||||||
|
|
||||||
|
fun bar(threadLocal: ThreadLocal<String?>) {
|
||||||
|
threadLocal.get()<!UNSAFE_CALL!>.<!>length
|
||||||
|
}
|
||||||
|
|
||||||
|
fun baz(ref: AtomicReference<String?>) {
|
||||||
|
ref.get()<!UNSAFE_CALL!>.<!>length
|
||||||
|
}
|
||||||
Generated
+6
@@ -22330,6 +22330,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/j+k/flexibleTypeVariablePosition.kt");
|
runTest("compiler/testData/diagnostics/tests/j+k/flexibleTypeVariablePosition.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("futureGet.kt")
|
||||||
|
public void testFutureGet() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/j+k/futureGet.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
||||||
public void testGenericConstructorWithMultipleBounds() {
|
public void testGenericConstructorWithMultipleBounds() {
|
||||||
|
|||||||
Reference in New Issue
Block a user