1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
This commit is contained in:
d2verb 2019-07-18 11:32:49 +09:00 committed by Alexander Medvednikov
parent 6f99876b6e
commit 92fbe56276
2 changed files with 10 additions and 0 deletions

View File

@ -548,9 +548,11 @@ fn type_default(typ string) string {
case 'i8': return '0'
case 'i16': return '0'
case 'i32': return '0'
case 'i64': return '0'
case 'u8': return '0'
case 'u16': return '0'
case 'u32': return '0'
case 'u64': return '0'
case 'byte': return '0'
case 'int': return '0'
case 'rune': return '0'

View File

@ -133,4 +133,12 @@ fn test_various_map_value() {
mut m15 := map[string]byteptr{}
m15['test'] = byteptr(0)
assert m15['test'] == byteptr(0)
mut m16 := map[string]i64{}
m16['test'] = i64(0)
assert m16['test'] == i64(0)
mut m17 := map[string]u64{}
m17['test'] = u64(0)
assert m17['test'] == u64(0)
}