Пример #1
0
 def visit_cast_expr(self, node: CastExpr) -> CastExpr:
     return CastExpr(self.expr(node.expr), self.type(node.type))
Пример #2
0
 def visit_cast_expr(self, e: CastExpr) -> None:
     super().visit_cast_expr(e)
     if isinstance(self.get_type(e), AnyType):
         e.expr = self.coerce(e.expr, AnyType(), self.get_type(e.expr),
                              self.type_context())
Пример #3
0
 def visit_cast_expr(self, e: CastExpr) -> None:
     super().visit_cast_expr(e)
     if isinstance(self.get_type(e), AnyType):
         e.expr = self.coerce(e.expr, AnyType(), self.get_type(e.expr),
                              self.type_context())