mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
java: hide method return type fix when compilation error won't be fixed (IDEA-244902)
GitOrigin-RevId: 8617da7628ec1ca24f66305b10573e331aa2c031
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3335afcf68
commit
fab2f3b722
+1
-1
@@ -678,7 +678,7 @@ public final class HighlightMethodUtil {
|
||||
private static void registerMethodReturnFixAction(@NotNull HighlightInfo highlightInfo,
|
||||
@NotNull MethodCandidateInfo candidate,
|
||||
@NotNull PsiCall methodCall) {
|
||||
if (methodCall.getParent() instanceof PsiReturnStatement) {
|
||||
if (candidate.getInferenceErrorMessage() != null && methodCall.getParent() instanceof PsiReturnStatement) {
|
||||
final PsiMethod containerMethod = PsiTreeUtil.getParentOfType(methodCall, PsiMethod.class, true, PsiLambdaExpression.class);
|
||||
if (containerMethod != null) {
|
||||
final PsiMethod method = candidate.getElement();
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// "Make 'bar' return 'Foo'" "true"
|
||||
public class Foo {
|
||||
public Foo(int i) {}
|
||||
|
||||
Foo bar() {
|
||||
return new Foo("");
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Make 'bar' return 'Foo'" "true"
|
||||
// "Make 'bar' return 'Foo'" "false"
|
||||
public class Foo {
|
||||
public Foo(int i) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user