Refactor resolution of double colon expression LHS
Try resolving the LHS only when it looks (PSI-wise) like it could represent a type element. This, for example, allows "illegal selector" error to be reported on weird expressions like '""?.""::class'. Also remove expression text from the "illegal selector" diagnostic, it's not needed and can screw up the error message if the text is too big
This commit is contained in:
@@ -8607,6 +8607,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("illegalSelectorCallableReference.kt")
|
||||
public void testIllegalSelectorCallableReference() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/illegalSelectorCallableReference.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inExpr.kt")
|
||||
public void testInExpr() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/inExpr.kt");
|
||||
|
||||
Reference in New Issue
Block a user