* @return {@code true} if and only if an error code is generated on the passed node
* @see StaticTypeWarningCode#NON_BOOL_EXPRESSION
*/
private boolean checkForNonBoolExpression(AssertStatement node) {
Expression expression = node.getCondition();
Type type = getStaticType(expression);
if (type instanceof InterfaceType) {
if (!type.isAssignableTo(boolType)) {
errorReporter.reportErrorForNode(StaticTypeWarningCode.NON_BOOL_EXPRESSION, expression);
return true;
}
} else if (type instanceof FunctionType) {
FunctionType functionType = (FunctionType) type;