Skip to content

Commit

Permalink
NPE fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-herrmann committed Sep 5, 2024
1 parent 28a9caa commit 2626f5f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,8 @@ public void resolve(BlockScope upperScope) {
patternVariables = LocalVariableBinding.merge(patternVariables, statement.bindingsWhenComplete());
}
}
if ((expressionType.id == TypeIds.T_boolean || expressionType.id == TypeIds.T_JavaLangBoolean)
if (expressionType != null
&& (expressionType.id == TypeIds.T_boolean || expressionType.id == TypeIds.T_JavaLangBoolean)
&& defaultFound && isExhaustive()) {
upperScope.problemReporter().caseDefaultPlusTrueAndFalse(this);
}
Expand Down

0 comments on commit 2626f5f

Please sign in to comment.