1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: prompt error on implicit int overflow by literal (#6410)

This commit is contained in:
Henrixounez
2020-09-20 16:29:01 +02:00
committed by GitHub
parent 34884c1631
commit 5086fd537c
11 changed files with 65 additions and 21 deletions

View File

@ -100,8 +100,8 @@ fn test_rand_i64_in_range() {
}
fn test_rand_int31() {
max_u31 := 0x7FFFFFFF
sign_mask := 0x80000000
max_u31 := int(0x7FFFFFFF)
sign_mask := int(0x80000000)
for _ in 0 .. rnd_count {
value := rand.int31()
assert value >= 0