Identical with ExprMutator::VisitBinding_(const MatchCastNode* binding) on the C++ side.
(self, binding: MatchCast)
| 310 | self.builder_.emit_normalized(VarBinding(new_var, new_value)) |
| 311 | |
| 312 | def visit_match_cast_(self, binding: MatchCast) -> None: |
| 313 | """Identical with ExprMutator::VisitBinding_(const MatchCastNode* binding) on the C++ side.""" |
| 314 | new_var = self.visit_var_def(binding.var) |
| 315 | new_value = self.visit_expr(binding.value) |
| 316 | |
| 317 | temp = self.with_struct_info(new_var, binding.struct_info) |
| 318 | if not temp.same_as(new_var): |
| 319 | new_var = temp |
| 320 | self.set_var_remap(binding.var.vid, new_var) |
| 321 | |
| 322 | self.log.add("MatchCast") |
| 323 | self.builder_.emit_normalized(MatchCast(new_var, new_value, binding.struct_info)) |
| 324 | |
| 325 | def visit_binding_block_(self, block: BindingBlock) -> BindingBlock: |
| 326 | """Identical with ExprMutator::VisitBindingBlock_(const BindingBlockNode* block) on the C++ side.""" |
nothing calls this directly
no test coverage detected