# 1. We need a `/` operation
if not node isa ASlashExpr then return
- # 2. The second operand must be a integer literal
+ # 2. The second operand must be an integer literal
var op2 = node.n_expr2
if not op2 isa AIntExpr then return
if not op1.mtype.is_subtype(mmodule, null, int_type) then return
# Error detected
- toolcontext.error(node.location, "Error: Definitely division by zero")
+ toolcontext.warning(node.location, "div-by-zero", "Warning: division by zero.")
end
end