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

parser: do not allow "int?", only "?int"

This commit is contained in:
Alexander Medvednikov
2019-09-23 23:17:06 +03:00
parent f27f3515ae
commit d2d75f3824
6 changed files with 10 additions and 17 deletions

View File

@ -9,7 +9,7 @@ import(
encoding.binary
)
pub fn int_u64(max u64) u64? {
pub fn int_u64(max u64) ?u64 {
bitlen := bits.len64(max)
if bitlen == 0 {
return u64(0)
@ -38,7 +38,7 @@ pub fn int_u64(max u64) u64? {
return n
}
fn bytes_to_u64(b []byte) []u64 {
fn bytes_to_u64(b []byte) []u64 {
ws := 64/8
mut z := [u64(0)].repeat((b.len + ws - 1) / ws)
mut i := b.len