[FIR] Fix false positive TYPE_VARIANCE_CONFLICT in nested class ^KT-49078 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
6c7c1a7a0d
commit
cc4dac5bec
+6
@@ -11544,6 +11544,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt");
|
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("noTypeVarianceConflictInNestedClass.kt")
|
||||||
|
public void testNoTypeVarianceConflictInNestedClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/noTypeVarianceConflictInNestedClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("outerArgumentsRequired.kt")
|
@TestMetadata("outerArgumentsRequired.kt")
|
||||||
public void testOuterArgumentsRequired() throws Exception {
|
public void testOuterArgumentsRequired() throws Exception {
|
||||||
|
|||||||
+6
@@ -11544,6 +11544,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
|||||||
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt");
|
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("noTypeVarianceConflictInNestedClass.kt")
|
||||||
|
public void testNoTypeVarianceConflictInNestedClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/noTypeVarianceConflictInNestedClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("outerArgumentsRequired.kt")
|
@TestMetadata("outerArgumentsRequired.kt")
|
||||||
public void testOuterArgumentsRequired() throws Exception {
|
public void testOuterArgumentsRequired() throws Exception {
|
||||||
|
|||||||
+6
@@ -11544,6 +11544,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
|||||||
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt");
|
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("noTypeVarianceConflictInNestedClass.kt")
|
||||||
|
public void testNoTypeVarianceConflictInNestedClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/noTypeVarianceConflictInNestedClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("outerArgumentsRequired.kt")
|
@TestMetadata("outerArgumentsRequired.kt")
|
||||||
public void testOuterArgumentsRequired() throws Exception {
|
public void testOuterArgumentsRequired() throws Exception {
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ object FirClassVarianceChecker : FirClassChecker() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (member is FirTypeParameterRefsOwner) {
|
if (member is FirTypeParameterRefsOwner && member !is FirClass) {
|
||||||
checkTypeParameters(member.typeParameters, Variance.IN_VARIANCE, context, reporter)
|
checkTypeParameters(member.typeParameters, Variance.IN_VARIANCE, context, reporter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
@@ -0,0 +1,7 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// KT-49078
|
||||||
|
|
||||||
|
class CidrMemoryData<T> {
|
||||||
|
interface Data<out T>
|
||||||
|
abstract class AbstractData<out T, E : Data<T>>
|
||||||
|
}
|
||||||
Vendored
+21
@@ -0,0 +1,21 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public final class CidrMemoryData</*0*/ T> {
|
||||||
|
public constructor CidrMemoryData</*0*/ T>()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
public abstract class AbstractData</*0*/ out T, /*1*/ E : CidrMemoryData.Data<T>> {
|
||||||
|
public constructor AbstractData</*0*/ out T, /*1*/ E : CidrMemoryData.Data<T>>()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Data</*0*/ out T> {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public final class CidrMemoryData</*0*/ T> {
|
||||||
|
public constructor CidrMemoryData</*0*/ T>()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
public abstract class AbstractData</*0*/ out T, /*1*/ E : CidrMemoryData.Data<T>> {
|
||||||
|
public constructor AbstractData</*0*/ out T, /*1*/ E : CidrMemoryData.Data<T>>()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Data</*0*/ out T> {
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+6
@@ -11550,6 +11550,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt");
|
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("noTypeVarianceConflictInNestedClass.kt")
|
||||||
|
public void testNoTypeVarianceConflictInNestedClass() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/noTypeVarianceConflictInNestedClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("outerArgumentsRequired.kt")
|
@TestMetadata("outerArgumentsRequired.kt")
|
||||||
public void testOuterArgumentsRequired() throws Exception {
|
public void testOuterArgumentsRequired() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user