[json] decoding struct with i32 member results in cgen error: json: i32 is not struct
#21161
Labels
Bug
This tag is applied to issues which reports bugs.
Describe the bug
x.json2 expects a type to be provided. When the type is a struct with an i32 field, the below error is output:
Reproduction Steps
Expected Behavior
json.decode successfully decodes the json into an instance of StructB
Current Behavior
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.5 5da1fcc
Environment details (OS name and version, etc.)
V full version: V 0.4.5 4687f8c.5da1fcc
OS: windows, Microsoft Windows 11 Pro v22631 64-bit
Processor: 12 cpus, 64bit, little endian,
getwd: C:\dev\v\winmd
vexe: C:\dev_tools\v\v.exe
vexe mtime: 2024-04-01 17:34:15
vroot: OK, value: C:\dev_tools\v
VMODULES: OK, value: C:\Users\simen.vmodules
VTMP: OK, value: C:\Users\simen\AppData\Local\Temp\v_0
Git version: git version 2.40.0.windows.1
Git vroot status: weekly.2024.13-65-g5da1fcca
.git/config present: true
CC version: Error: 'cc' is not recognized as an internal or external command,
operable program or batch file.
thirdparty/tcc status: thirdparty-windows-amd64 a39eb79b
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: