mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 07:40:42 +07:00
java method ref highlighting: don't mirror errors of not applicable methods of return type (IDEA-224306)
GitOrigin-RevId: 40b4293c754640445b9fac741eab24261e8060cc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1d55c64626
commit
589b029a97
+18
@@ -0,0 +1,18 @@
|
||||
import java.util.function.Function;
|
||||
|
||||
abstract class Logger {
|
||||
public void error(Throwable t) { }
|
||||
public abstract void error(String message, Throwable t, String... details);
|
||||
}
|
||||
|
||||
public class JavaTest {
|
||||
private static Logger ourLogger = null;
|
||||
|
||||
void test() {
|
||||
test2(<error descr="Bad return type in method reference: cannot convert void to java.lang.Void">ourLogger::error</error>);
|
||||
test3(<error descr="Bad return type in method reference: cannot convert void to java.lang.Integer">ourLogger::error</error>);
|
||||
}
|
||||
|
||||
void test2(Function<Throwable, Void> x) { }
|
||||
void test3(Function<Throwable, Integer> x) { }
|
||||
}
|
||||
Reference in New Issue
Block a user