[Tests] Add test for #KT-65712
This commit is contained in:
committed by
Space Team
parent
9391ff8179
commit
91e4837c95
+6
@@ -18047,6 +18047,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("capturedUpperBound.kt")
|
||||||
|
public void testCapturedUpperBound() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedUpperBound.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
||||||
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
||||||
|
|||||||
+6
@@ -18047,6 +18047,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("capturedUpperBound.kt")
|
||||||
|
public void testCapturedUpperBound() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedUpperBound.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
||||||
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
||||||
|
|||||||
+6
@@ -18041,6 +18041,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("capturedUpperBound.kt")
|
||||||
|
public void testCapturedUpperBound() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedUpperBound.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
||||||
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
||||||
|
|||||||
+6
@@ -18047,6 +18047,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("capturedUpperBound.kt")
|
||||||
|
public void testCapturedUpperBound() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedUpperBound.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
||||||
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
// ISSUE: KT-65712
|
||||||
|
|
||||||
|
fun test(a: BodySpec<List<*>, *>) {
|
||||||
|
a.value<<!UPPER_BOUND_VIOLATED!>BodySpec<List<*>, *><!>>()
|
||||||
|
a.value<<!UPPER_BOUND_VIOLATED!>BodySpec<*, *><!>>()
|
||||||
|
a.value<<!UPPER_BOUND_VIOLATED!>BodySpec<Int, *><!>>()
|
||||||
|
}
|
||||||
|
|
||||||
|
interface BodySpec<B, S : BodySpec<B, S>> {
|
||||||
|
fun <T : S> value(): T
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
// ISSUE: KT-65712
|
||||||
|
|
||||||
|
fun test(a: BodySpec<List<*>, *>) {
|
||||||
|
a.value<BodySpec<List<*>, *>>()
|
||||||
|
a.value<BodySpec<*, *>>()
|
||||||
|
a.value<BodySpec<Int, *>>()
|
||||||
|
}
|
||||||
|
|
||||||
|
interface BodySpec<B, S : BodySpec<B, S>> {
|
||||||
|
fun <T : S> value(): T
|
||||||
|
}
|
||||||
Generated
+6
@@ -18047,6 +18047,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypesSubstitutionIntoAbbreviation.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("capturedUpperBound.kt")
|
||||||
|
public void testCapturedUpperBound() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedUpperBound.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
@TestMetadata("capturingFromArgumentOfFlexibleType.kt")
|
||||||
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
public void testCapturingFromArgumentOfFlexibleType() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user