mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
std.json: fix compile error for comptime fields
This is covered by an existing test which was already failing.
This commit is contained in:
parent
0b7347fd18
commit
17822e4a05
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user