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

expression: set integer literals as int by default

This commit is contained in:
SleepyRoy
2020-03-24 03:05:37 +08:00
committed by GitHub
parent 5c9cbae10d
commit 67ba56c65c
14 changed files with 788 additions and 793 deletions

View File

@@ -150,8 +150,9 @@ 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 := -321314588900011
assert typeof(x6) == 'u64'
x7 := u64(-321314588900011)
assert typeof(x6) == 'int'
assert typeof(x7) == 'u64'
}