CheckTypesResult () { CheckTypesResult result = new CheckTypesResult(); result.addMinTypeExprent(value, VarType.VARTYPE_BYTECHAR); result.addMaxTypeExprent(value, VarType.VARTYPE_INT); VarType valType = value.getExprType(); for (List<Exprent> lst : caseValues) { for (Exprent expr : lst) { if (expr != null) { VarType caseType = expr.getExprType(); if (!caseType.equals(valType)) { valType = VarType.getCommonSupertype(caseType, valType); result.addMinTypeExprent(value, valType); } } } } return result; }