Set reference target and report custom error instead unresolved reference for cases: interface, generic parameter, object + invoke, class without companion.

#KT-2787 Fixed.
This commit is contained in:
Stanislav Erokhin
2016-08-31 16:03:11 +03:00
parent eb6f444c19
commit bebc75c8ef
17 changed files with 338 additions and 12 deletions
@@ -15603,6 +15603,33 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
}
}
@TestMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class NoCandidates extends AbstractDiagnosticsTest {
public void testAllFilesPresentInNoCandidates() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/noCandidates"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("kt2787.kt")
public void testKt2787() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates/kt2787.kt");
doTest(fileName);
}
@TestMetadata("resolvedToClassifier.kt")
public void testResolvedToClassifier() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifier.kt");
doTest(fileName);
}
@TestMetadata("resolvedToClassifierWithReceiver.kt")
public void testResolvedToClassifierWithReceiver() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifierWithReceiver.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)