[NI] Revise variance calculation method for completion mode
Before fix only one level of type arguments was used to determine variance of type variable to find out direction requirements. This incorrect in general case, because outer variance affects subtyping deductions, for example: Inv<Out<A>> <: Inv<Out<B>> => A <: B; B <: A, despite A and B are in covariant position if only one level is considered ^KT-36233 Fixed
This commit is contained in:
Generated
+30
@@ -10602,21 +10602,51 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/basic.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("definetlyNotNullType.kt")
|
||||
public void testDefinetlyNotNullType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/definetlyNotNullType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("equalityConstraintUpstairs.kt")
|
||||
public void testEqualityConstraintUpstairs() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/equalityConstraintUpstairs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("flexibleType.kt")
|
||||
public void testFlexibleType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/flexibleType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("intersectionType.kt")
|
||||
public void testIntersectionType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/intersectionType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt33166.kt")
|
||||
public void testKt33166() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/kt33166.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36233.kt")
|
||||
public void testKt36233() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/kt36233.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaWithVariableAndNothing.kt")
|
||||
public void testLambdaWithVariableAndNothing() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/lambdaWithVariableAndNothing.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedVariance.kt")
|
||||
public void testNestedVariance() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/nestedVariance.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nothingFromNestedCall.kt")
|
||||
public void testNothingFromNestedCall() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/nothingFromNestedCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("partialForIlt.kt")
|
||||
public void testPartialForIlt() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/completion/partialForIlt.kt");
|
||||
|
||||
Reference in New Issue
Block a user