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

@ -182,10 +182,7 @@ fn test_int_decl() {
assert typeof(x3) == 'int'
assert typeof(x4) == 'int'
assert typeof(x5) == 'int'
// integers are always 'int' by default
x6 := 989898932113111
x7 := u64(-321314588900011)
assert typeof(x6) == 'int'
assert typeof(x7) == 'u64'
}