NodeList<SwitchMember> switchMembers = node.getMembers();
boolean foundError = false;
Type firstType = null;
for (SwitchMember switchMember : switchMembers) {
if (switchMember instanceof SwitchCase) {
SwitchCase switchCase = (SwitchCase) switchMember;
Expression expression = switchCase.getExpression();
EvaluationResultImpl caseResult = validate(
expression,
CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION);
if (caseResult instanceof ValidResult) {
reportErrorIfFromDeferredLibrary(