[FIR] Fix resolution of objects in presence of low-priority candidates
For CallKind.VariableAccess, the condition when to *skip* resolution of objects was previously collector.isSuccess. This wasn't strict enough because collector.isSuccess could be true when the best found candidate has an applicability like RESOLVED_WITH_LOW_PRIORITY (e.g. from dynamic scope or annotated with @LowPriorityInOverloadResolution). In these cases, we do want to resolve objects. To fix this, the condition is changed to collector.shouldStopResolve which is stricter. #KT-57960 Fixed
This commit is contained in:
committed by
Space Team
parent
bc7aea1426
commit
8b47a4fa48
+6
@@ -39239,6 +39239,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt35210.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lowPriorityTopLevelValAndObject.kt")
|
||||
public void testLowPriorityTopLevelValAndObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/lowPriorityTopLevelValAndObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("moreOnlyInputTypes.kt")
|
||||
public void testMoreOnlyInputTypes() throws Exception {
|
||||
|
||||
+6
@@ -39239,6 +39239,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/kt35210.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lowPriorityTopLevelValAndObject.kt")
|
||||
public void testLowPriorityTopLevelValAndObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/lowPriorityTopLevelValAndObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("moreOnlyInputTypes.kt")
|
||||
public void testMoreOnlyInputTypes() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user