1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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

This commit is contained in:
Delyan Angelov 2020-06-01 19:04:17 +03:00
parent c6a7d0a3a0
commit 6161392648

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 {