json: do not generate comptime encode/decode functions already defined in json_primitives.v

pull/5159/head
Delyan Angelov 2020-06-01 19:04:17 +03:00
parent c6a7d0a3a0
commit 6161392648
1 changed files with 1 additions and 1 deletions

View File

@ -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 {