don't correct substitution if not applicable, e.g. for unresolved functional types

This commit is contained in:
Anna Kozlova
2015-08-18 19:04:23 +02:00
parent fa2a8bf117
commit 4518420113
3 changed files with 14 additions and 1 deletions

View File

@@ -280,7 +280,6 @@ public class PsiSubstitutorImpl implements PsiSubstitutor {
@Override
public PsiType visitType(PsiType type) {
LOG.error(type.getInternalCanonicalText());
return null;
}
});

View File

@@ -0,0 +1,10 @@
class Test {
{
asList(<error descr="Cyclic inference">o -> {}</error>, 1, 2, 3);
asList(<error descr="T is not a functional interface">Test::foo</error>, 1, 2, 3);
}
void foo() {}
<T> void asList(T... tS) {}
}

View File

@@ -422,6 +422,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
public void testIncompleteMethodReferenceWithUncheckedWarningInspection() throws Exception {
doTest();
}
private void doTest() {
doTest(false);
}