IDEA-272912 - fixed test

GitOrigin-RevId: 1f2de66a9cb88f257a43ce0be81b3db7b84cb146
This commit is contained in:
Ilyas Selimov
2021-07-02 14:56:01 +00:00
committed by intellij-monorepo-bot
parent bd806744fb
commit 4837943ffe
2 changed files with 3 additions and 3 deletions
@@ -931,10 +931,10 @@ final class ControlFlowAnalyzer extends JavaElementVisitor {
}
PsiCodeBlock body = statement.getBody();
PsiType exprType = expr == null ? null : expr.getType();
if (body != null) {
PsiStatement[] statements = body.getStatements();
boolean needToCreateDefault = false;
PsiType exprType = expr == null ? null : expr.getType();
for (PsiStatement aStatement : statements) {
ProgressManager.checkCanceled();
if (!(aStatement instanceof PsiSwitchLabelStatementBase)) continue;
@@ -49,8 +49,8 @@ class Test {
void testSealedClassUnreachable1(I i) {
switch (i) {
Object o:
throw new IllegalArgumentException();
case Object o:
throw new IllegalArgumentException();
}
<error descr="Unreachable statement">System.out.println();</error>
}