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

checker: restrict numeric promotions to cases where no data is lost

This commit is contained in:
Uwe Krüger
2020-05-27 05:42:48 +02:00
committed by GitHub
parent fc67046bac
commit 013fdb8a4b
81 changed files with 510 additions and 247 deletions

View File

@ -214,7 +214,7 @@ fn test_int_to_hex() {
assert u32(c0).hex() == 'c'
assert 2147483647.hex() == '7fffffff'
assert u32(2147483647).hex() == '7fffffff'
assert (-1).hex() == 'ffffffff'
assert (-1).hex() == 'ffffffffffffffff'
assert u32(4294967295).hex() == 'ffffffff'
// 64 bit
assert u64(0).hex() == '0'