invert if: do not skip returns as they may contain valuable info (IDEA-61892)

This commit is contained in:
anna
2010-12-22 22:25:20 +03:00
parent 79b47c42ad
commit 9010b36338
4 changed files with 21 additions and 2 deletions
@@ -44,7 +44,7 @@ public class a {
ia[~i | (i+=(!b?2:i))] -= i + 3.3;
// Object += String
o += o + "string";
<error descr="Operator '+' cannot be applied to 'java.lang.Object','java.lang.String'">o += o + "string"</error>;
return 0;
}
@@ -0,0 +1,10 @@
// "Invert If Condition" "true"
class Test {
public static int create() {
if (true) {
return;
}
return "s";
}
}
@@ -0,0 +1,9 @@
// "Invert If Condition" "true"
class Test {
public static int create() {
if (!tr<caret>ue) {
return "s";
}
}
}