K2: reproduce KT-61959

This commit is contained in:
Mikhail Glukhikh
2023-09-22 17:26:29 +02:00
committed by Space Team
parent 92470484bf
commit cdc197c723
7 changed files with 56 additions and 0 deletions
@@ -34558,6 +34558,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/typeParameters/misplacedConstraints.kt");
}
@Test
@TestMetadata("outerTypeParameterAsBound.kt")
public void testOuterTypeParameterAsBound() throws Exception {
runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsBound.kt");
}
@Test
@TestMetadata("propertyTypeParameters.kt")
public void testPropertyTypeParameters() throws Exception {
@@ -34558,6 +34558,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/typeParameters/misplacedConstraints.kt");
}
@Test
@TestMetadata("outerTypeParameterAsBound.kt")
public void testOuterTypeParameterAsBound() throws Exception {
runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsBound.kt");
}
@Test
@TestMetadata("propertyTypeParameters.kt")
public void testPropertyTypeParameters() throws Exception {
@@ -34558,6 +34558,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/typeParameters/misplacedConstraints.kt");
}
@Test
@TestMetadata("outerTypeParameterAsBound.kt")
public void testOuterTypeParameterAsBound() throws Exception {
runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsBound.kt");
}
@Test
@TestMetadata("propertyTypeParameters.kt")
public void testPropertyTypeParameters() throws Exception {
@@ -34672,6 +34672,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/typeParameters/misplacedConstraints.kt");
}
@Test
@TestMetadata("outerTypeParameterAsBound.kt")
public void testOuterTypeParameterAsBound() throws Exception {
runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsBound.kt");
}
@Test
@TestMetadata("propertyTypeParameters.kt")
public void testPropertyTypeParameters() throws Exception {
@@ -0,0 +1,13 @@
// ISSUE: KT-61959
package test
interface OuterParam
class Outer<OuterParam> {
class Nested<NestedParam : OuterParam>
}
fun main() {
Outer.Nested<<!UPPER_BOUND_VIOLATED!>OuterParam<!>>()
}
@@ -0,0 +1,13 @@
// ISSUE: KT-61959
package test
interface OuterParam
class Outer<OuterParam> {
class Nested<NestedParam : OuterParam>
}
fun main() {
Outer.Nested<OuterParam>()
}
@@ -36518,6 +36518,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/typeParameters/misplacedConstraints.kt");
}
@Test
@TestMetadata("outerTypeParameterAsBound.kt")
public void testOuterTypeParameterAsBound() throws Exception {
runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsBound.kt");
}
@Test
@TestMetadata("propertyTypeParameters.kt")
public void testPropertyTypeParameters() throws Exception {