[NI] Add extra ordering for ready-for-fixation variables
Helps fixing to more specific type in the following situations: Type1 <: Var1 Var2 <: Var1 Var2 <: Type2 Type1 and Type2 may also be nullable and non-nullable versions of the same type. Note that no additional constraints can be inferred from such constraints before fixation. Resulting types for variables will always Type1 and Type2 may also be nullable and non-nullable versions of the same type. Fixing Var1 first will make Var2's type more specific while fixing Var2 first will make Var1's type less specific. The first is preferrable in general.
This commit is contained in:
+5
@@ -11965,6 +11965,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
|
||||
runTest("compiler/testData/diagnostics/tests/inference/regressions/kt41386.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt41394.kt")
|
||||
public void testKt41394() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/regressions/kt41394.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt4420.kt")
|
||||
public void testKt4420() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/regressions/kt4420.kt");
|
||||
|
||||
Reference in New Issue
Block a user