checker: do not allow &u8(0), force nil like we do with &Type(0)

This commit is contained in:
Alexander Medvednikov 2025-05-03 22:37:51 +03:00
parent 3ab660b4c6
commit 7d57a19d7e
52 changed files with 184 additions and 118 deletions

View file

@ -200,8 +200,8 @@ fn test_various_map_value() {
m14['test'] = voidptr(0)
assert m14['test'] == voidptr(0)
mut m15 := map[string]&byte{}
m15['test'] = &u8(0)
assert m15['test'] == &u8(0)
m15['test'] = &u8(unsafe { nil })
assert m15['test'] == &u8(unsafe { nil })
mut m16 := map[string]i64{}
m16['test'] = i64(0)
assert m16['test'] == i64(0)