Java: Better handling of unreachable code (IDEA-172642)

This commit is contained in:
Pavel Dolgov
2017-05-23 12:28:44 +03:00
parent da8b1f4a00
commit 16b1765f7f
19 changed files with 280 additions and 7 deletions
@@ -0,0 +1,10 @@
class WithCondition {
void testForEach() {
return;
<error descr="Unreachable statement">for</error> (int i: this.array()) {
System.out.println("Never");
}
}
int[] array() { return new int[0]; }
}