mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
IDEA-185819 Operator ! cannot be applied to void: add a quick-fix
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// "Make 'victim' return 'boolean'" "true"
|
||||
class Test {
|
||||
public void trigger() {
|
||||
if (!victim()) {
|
||||
System.out.println("***");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean victim() {
|
||||
final int something = 1;
|
||||
final boolean value = false;
|
||||
int another = 10;
|
||||
final boolean secondBoolean = another == something;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Make 'victim' return 'boolean'" "true"
|
||||
class Test {
|
||||
public void trigger() {
|
||||
if (!<caret>victim()) {
|
||||
System.out.println("***");
|
||||
}
|
||||
}
|
||||
|
||||
public void victim() {
|
||||
final int something = 1;
|
||||
final boolean value = false;
|
||||
int another = 10;
|
||||
final boolean secondBoolean = another == something;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user