K1/K2: add test for Future.get case
This commit is contained in:
committed by
Space Team
parent
f597c02327
commit
633e96b966
+6
@@ -22330,6 +22330,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
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
|
||||
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
||||
public void testGenericConstructorWithMultipleBounds() {
|
||||
|
||||
+6
@@ -22330,6 +22330,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
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
|
||||
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
||||
public void testGenericConstructorWithMultipleBounds() {
|
||||
|
||||
+6
@@ -22324,6 +22324,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
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
|
||||
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
||||
public void testGenericConstructorWithMultipleBounds() {
|
||||
|
||||
+6
@@ -22330,6 +22330,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
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
|
||||
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
||||
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");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("futureGet.kt")
|
||||
public void testFutureGet() {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/futureGet.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericConstructorWithMultipleBounds.kt")
|
||||
public void testGenericConstructorWithMultipleBounds() {
|
||||
|
||||
Reference in New Issue
Block a user