Skip to content
Snippets Groups Projects
Commit b0904d93 authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Fix typecheck

parent 3c3283cd
No related branches found
No related tags found
1 merge request!438Reduction Support
......@@ -15,18 +15,17 @@ def reduction_op_to_expr(op: ReductionOp, op1, op2) -> PsExpression:
if op in _available_operator_interface:
match op:
case ReductionOp.Add:
operator = PsAdd
return PsAdd(op1, op2)
case ReductionOp.Sub:
operator = PsSub
return PsSub(op1, op2)
case ReductionOp.Mul:
operator = PsMul
return PsMul(op1, op2)
case ReductionOp.Div:
operator = PsDiv
return PsDiv(op1, op2)
case _:
raise FreezeError(
f"Found unsupported operation type for reduction assignments: {op}."
)
return operator(op1, op2)
else:
match op:
case ReductionOp.Min:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment