[NI] Relax rules for call completion: require at least one constraint
It's enough to have at least one good constraint. Note that the whole algorithm can be a bit more general: we could check also Out<T>, In<T> and verify that T has good only lower constraint or upper constraint, but there are questions for types like Inv<Out<T>>, where T should have lower and upper constraints #KT-31514 Fixed
This commit is contained in:
@@ -10036,6 +10036,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("earlyCompletionForCalls.kt")
|
||||
public void testEarlyCompletionForCalls() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/constraints/earlyCompletionForCalls.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("equalityConstraintOnNullableType.kt")
|
||||
public void testEqualityConstraintOnNullableType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/constraints/equalityConstraintOnNullableType.kt");
|
||||
@@ -10051,6 +10056,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/constraints/ignoreConstraintFromImplicitInNothing.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inferTypeFromCapturedStarProjection.kt")
|
||||
public void testInferTypeFromCapturedStarProjection() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/constraints/inferTypeFromCapturedStarProjection.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt6320.kt")
|
||||
public void testKt6320() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/constraints/kt6320.kt");
|
||||
|
||||
Reference in New Issue
Block a user