-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.Fixed in x.json2A JSON related issue, that is fixed in `x.json2` module.A JSON related issue, that is fixed in `x.json2` module.Option TypeBugs/feature requests, that are related to `?Type`.Bugs/feature requests, that are related to `?Type`.Status: ConfirmedThis bug has been confirmed to be valid by a contributor.This bug has been confirmed to be valid by a contributor.Unit: CompilerBugs/feature requests, that are related to the V compiler in general.Bugs/feature requests, that are related to the V compiler in general.Unit: cgenBugs/feature requests, that are related to the default C generating backend.Bugs/feature requests, that are related to the default C generating backend.
Description
V version: 0.3.2 ae816b1
OS: ArchLinux
What did you do?
import json
struct Foo{
name string
num ?int
}
fn main(){
f := Foo{}
dump(json.encode(f))
}What did you expect to see?
No error.
Ideally, the following results.
{"name":""} or {"name":"","num":null}
What did you see instead?
==================
/tmp/v_1000/bug.330116750381110337.tmp.c:2155: error: '_result__option_int' undeclared
...
==================
Metadata
Metadata
Assignees
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.Fixed in x.json2A JSON related issue, that is fixed in `x.json2` module.A JSON related issue, that is fixed in `x.json2` module.Option TypeBugs/feature requests, that are related to `?Type`.Bugs/feature requests, that are related to `?Type`.Status: ConfirmedThis bug has been confirmed to be valid by a contributor.This bug has been confirmed to be valid by a contributor.Unit: CompilerBugs/feature requests, that are related to the V compiler in general.Bugs/feature requests, that are related to the V compiler in general.Unit: cgenBugs/feature requests, that are related to the default C generating backend.Bugs/feature requests, that are related to the default C generating backend.