def expressions_type_error_messages(self, td):
        error_messages = []
        error_messages.extend(self._condition.type_error_messages(td))
        for x in self._statements:
            error_messages.extend(x.expressions_type_error_messages(td))

        if not self._condition.return_type(td) == bool_type.Bool():
            error_messages.append("the return type of the expression: %s is not of type bool" % str(self._condition))
        return error_messages
 def return_type(self, type_map):
     return bool_type.Bool()
Ejemplo n.º 3
0
 def type_error_messages(self, td):
     return self.__operand.type_error_messages(
     ) and self.__operand.return_type == bool_type.Bool()