Function
has_union_operands
(a: PyObjectRef, b: PyObjectRef, vm: &VirtualMachine)
Source from the content-addressed store, hash-verified
| 215 | } |
| 216 | |
| 217 | fn has_union_operands(a: PyObjectRef, b: PyObjectRef, vm: &VirtualMachine) -> bool { |
| 218 | let union_type = vm.ctx.types.union_type; |
| 219 | a.class().is(union_type) || b.class().is(union_type) |
| 220 | } |
| 221 | |
| 222 | pub fn or_op(zelf: PyObjectRef, other: PyObjectRef, vm: &VirtualMachine) -> PyResult { |
| 223 | if !has_union_operands(zelf.clone(), other.clone(), vm) |
Tested by
no test coverage detected