From 92fbe56276e41a1c2e47169aef2d51a54adfbefe Mon Sep 17 00:00:00 2001 From: d2verb Date: Thu, 18 Jul 2019 11:32:49 +0900 Subject: [PATCH] table: fix #1219 --- compiler/table.v | 2 ++ vlib/builtin/map_test.v | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/compiler/table.v b/compiler/table.v index a7c6f2081c..34003c6e21 100644 --- a/compiler/table.v +++ b/compiler/table.v @@ -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' diff --git a/vlib/builtin/map_test.v b/vlib/builtin/map_test.v index 9abe248bb5..3a21e4d930 100644 --- a/vlib/builtin/map_test.v +++ b/vlib/builtin/map_test.v @@ -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) }