Fix "rewrite at slice LEXICAL_SCOPE" during callable reference resolution
Following the TODO in CallableReferencesResolutionUtils.kt, delete the suspicious scope and use the new resolution process with the qualifier which was obtained after the resolution of LHS. However, by default the tower resolution algorithm also considers each qualifier as a class value as well, which would be wrong here because resolution of LHS as a "value" happens earlier in DoubleColonExpressionResolver and with slightly different rules. To avoid that, do not mix in the "explicit receiver" scope tower processor when creating processors for callable reference resolution. Also delete unused functions and classes related to deleted scope, refactor Scopes.kt #KT-8596 Fixed
This commit is contained in:
@@ -2285,6 +2285,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt8596.kt")
|
||||
public void testKt8596() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt8596.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt9601.kt")
|
||||
public void testKt9601() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.kt");
|
||||
|
||||
Reference in New Issue
Block a user