From 6161392648840666f2dd6c3400f6d99c4c0f3823 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 1 Jun 2020 19:04:17 +0300 Subject: [PATCH] json: do not generate comptime encode/decode functions already defined in json_primitives.v --- vlib/v/gen/json.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/gen/json.v b/vlib/v/gen/json.v index 9e35abd478..97b404cc35 100644 --- a/vlib/v/gen/json.v +++ b/vlib/v/gen/json.v @@ -22,7 +22,7 @@ fn (mut g Gen) gen_json_for_type(typ table.Type) { mut enc := strings.new_builder(100) sym := g.table.get_type_symbol(typ) styp := g.typ(typ) - if sym.name in ['int', 'string', 'bool', 'f32'] { + if sym.name in ['int', 'string', 'bool', 'f32', 'f64', 'i8', 'i16', 'i64', 'byte', 'u16', 'u32', 'u64', 'bool'] { return } if sym.kind == .array {