mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
[java-highlightings] Don't propose fix making return type void for method calls in conditional expressions branches
IDEA-256730 GitOrigin-RevId: 2953a47102a15fa572ac8271edb9bb0fe7c2f49e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bbd337ff8f
commit
381684d2b2
@@ -0,0 +1,13 @@
|
||||
// "Make 'foo' return 'int'" "true"
|
||||
abstract class A {
|
||||
private int condition(boolean flag) {
|
||||
return flag ? foo() : bar();
|
||||
}
|
||||
|
||||
abstract int foo();
|
||||
abstract C bar();
|
||||
|
||||
interface B {}
|
||||
interface C extends B {}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Make 'foo' return 'int'" "true"
|
||||
abstract class A {
|
||||
private int condition(boolean flag) {
|
||||
return flag ? foo()<caret> : bar();
|
||||
}
|
||||
|
||||
abstract B foo();
|
||||
abstract C bar();
|
||||
|
||||
interface B {}
|
||||
interface C extends B {}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Make 'foo' return 'void'" "false"
|
||||
abstract class A {
|
||||
private void condition(boolean flag) {
|
||||
return flag ? foo()<caret> : bar();
|
||||
}
|
||||
|
||||
abstract B foo();
|
||||
abstract C bar();
|
||||
|
||||
interface B {}
|
||||
interface C extends B {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user