[Test] Add additional test for KT-21463

This commit is contained in:
Dmitriy Novozhilov
2023-11-01 16:42:58 +02:00
committed by Space Team
parent 85665d71ca
commit e473b52da7
7 changed files with 60 additions and 0 deletions
@@ -13750,6 +13750,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/generics/anonymousObjectSupertypeWithTypeParameterFromFunction.kt");
}
@Test
@TestMetadata("approximationOfBoundedProjection.kt")
public void testApproximationOfBoundedProjection() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/approximationOfBoundedProjection.kt");
}
@Test
@TestMetadata("approximationOfInProjection.kt")
public void testApproximationOfInProjection() throws Exception {
@@ -13750,6 +13750,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/generics/anonymousObjectSupertypeWithTypeParameterFromFunction.kt");
}
@Test
@TestMetadata("approximationOfBoundedProjection.kt")
public void testApproximationOfBoundedProjection() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/approximationOfBoundedProjection.kt");
}
@Test
@TestMetadata("approximationOfInProjection.kt")
public void testApproximationOfInProjection() throws Exception {
@@ -13744,6 +13744,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/generics/anonymousObjectSupertypeWithTypeParameterFromFunction.kt");
}
@Test
@TestMetadata("approximationOfBoundedProjection.kt")
public void testApproximationOfBoundedProjection() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/approximationOfBoundedProjection.kt");
}
@Test
@TestMetadata("approximationOfInProjection.kt")
public void testApproximationOfInProjection() throws Exception {
@@ -13750,6 +13750,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/generics/anonymousObjectSupertypeWithTypeParameterFromFunction.kt");
}
@Test
@TestMetadata("approximationOfBoundedProjection.kt")
public void testApproximationOfBoundedProjection() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/approximationOfBoundedProjection.kt");
}
@Test
@TestMetadata("approximationOfInProjection.kt")
public void testApproximationOfInProjection() throws Exception {
@@ -0,0 +1,15 @@
// ISSUE: KT-21463
interface BoxWrapper<T, B : Box<T>> {
val box: B
}
interface Box<T> {
val item: T
}
fun <T> getBoxWrapper(): BoxWrapper<T, *> = null!!
class Element
val box: Box<Element> = getBoxWrapper<Element>().box
@@ -0,0 +1,15 @@
// ISSUE: KT-21463
interface BoxWrapper<T, B : Box<T>> {
val box: B
}
interface Box<T> {
val item: T
}
fun <T> getBoxWrapper(): BoxWrapper<T, *> = null!!
class Element
val box: Box<Element> = <!TYPE_MISMATCH!>getBoxWrapper<Element>().box<!>
@@ -13750,6 +13750,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/generics/anonymousObjectSupertypeWithTypeParameterFromFunction.kt");
}
@Test
@TestMetadata("approximationOfBoundedProjection.kt")
public void testApproximationOfBoundedProjection() throws Exception {
runTest("compiler/testData/diagnostics/tests/generics/approximationOfBoundedProjection.kt");
}
@Test
@TestMetadata("approximationOfInProjection.kt")
public void testApproximationOfInProjection() throws Exception {