mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: Update Division or Modulo by Zero Message
This commit is contained in:
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
Block a user