mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-21 05:51:25 +07:00
don't correct substitution if not applicable, e.g. for unresolved functional types
This commit is contained in:
@@ -280,7 +280,6 @@ public class PsiSubstitutorImpl implements PsiSubstitutor {
|
||||
|
||||
@Override
|
||||
public PsiType visitType(PsiType type) {
|
||||
LOG.error(type.getInternalCanonicalText());
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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) {}
|
||||
}
|
||||
@@ -422,6 +422,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testIncompleteMethodReferenceWithUncheckedWarningInspection() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user