Open acabarbaye opened 3 years ago
As per my API definition, I have defined some custom types which actually are booleans: e.g.
type EmbedParam bool
in the generated code, I get
var tval bool if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { tval = true } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { tval = false } else { err = errors.New("unexpected bytes for true/false value") return fs.WrapErr(err) } j.Embed = &tval
tval is defined as a bool instead of EmbedParam like Embed, meaning I get the following compilation error:
bool
EmbedParam
Embed
.\****_ffjson.go:***:12: cannot use &tval (type *bool) as type *EmbedParam in assignment
Could the local variable be defined using the custom type i.e. var tval EmbedParam?
var tval EmbedParam
As per my API definition, I have defined some custom types which actually are booleans: e.g.
in the generated code, I get
tval is defined as a
bool
instead ofEmbedParam
likeEmbed
, meaning I get the following compilation error:Could the local variable be defined using the custom type i.e.
var tval EmbedParam
?