mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-06-14 18:38:47 +07:00
Java: Don't offer "Unwrap 'else' branch" intention if it might cause unreachable code (IDEA-165428)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// "Unwrap 'else' branch (changes semantics)" "false"
|
||||
|
||||
class T {
|
||||
void f(boolean b) {
|
||||
Label:
|
||||
{
|
||||
if (b)
|
||||
System.out.println("When true");
|
||||
<caret>else {
|
||||
throw new RuntimeException("Otherwise");
|
||||
}
|
||||
}
|
||||
System.out.println("Done");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user