Java: Don't offer "Unwrap 'else' branch" intention if it might cause unreachable code (IDEA-165428)

This commit is contained in:
Pavel Dolgov
2017-01-17 16:36:08 +03:00
parent 09aa5b41f8
commit ce236e3666
50 changed files with 594 additions and 87 deletions
@@ -0,0 +1,14 @@
// "Unwrap 'else' branch" "false"
class T {
void m(boolean b) {
if (b) {
System.out.println(1);
}
<caret>else {
System.out.println(2);
return;
}
System.out.println(3);
}
}