diff options
| author | sharpobject <sharpobject@gmail.com> | 2022-02-10 05:57:10 +0900 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-02-13 14:33:17 +0200 |
| commit | 17822e4a050dcbcf7fe324fcdff68887fee73ff1 (patch) | |
| tree | 8f9492befb7ea594d8951ff3ecd9d29aca9b6da3 /lib/std/json.zig | |
| parent | 0b7347fd18eee7dd829cd9aaed3683123d84859b (diff) | |
| download | zig-17822e4a050dcbcf7fe324fcdff68887fee73ff1.tar.gz zig-17822e4a050dcbcf7fe324fcdff68887fee73ff1.zip | |
std.json: fix compile error for comptime fields
This is covered by an existing test which was already failing.
Diffstat (limited to 'lib/std/json.zig')
| -rw-r--r-- | lib/std/json.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/json.zig b/lib/std/json.zig index ec3544364f..e9fde26bec 100644 --- a/lib/std/json.zig +++ b/lib/std/json.zig @@ -1766,7 +1766,7 @@ fn parseInternal( } } if (field.is_comptime) { - if (!try parsesTo(field.field_type, field.default_value.?, tokens, child_options)) { + if (!try parsesTo(field.field_type, @ptrCast(*const field.field_type, field.default_value.?).*, tokens, child_options)) { return error.UnexpectedValue; } } else { |
