parser: Update Division or Modulo by Zero Message
parent
d59d921e84
commit
7952d591b9
|
@ -2435,7 +2435,7 @@ fn (p mut Parser) term() string {
|
|||
p.gen(tok.str())// + ' /*op2*/ ')
|
||||
p.fgen(' ' + tok.str() + ' ')
|
||||
if (is_div || is_mod) && p.tok == .number && p.lit == '0' {
|
||||
p.error('division by zero')
|
||||
p.error('division or modulo by zero')
|
||||
}
|
||||
if is_mod && (is_float_type(typ) || !is_number_type(typ)) {
|
||||
p.error('operator .mod requires integer types')
|
||||
|
|
Loading…
Reference in New Issue