aboutsummaryrefslogtreecommitdiff
path: root/lib/std/json.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-02-14 12:34:33 +0200
committerGitHub <noreply@github.com>2022-02-14 12:34:33 +0200
commit3eb29f15f537ee79df8f2c4afa0db94ce6137d4c (patch)
tree39c9681be2adbdf7f7022203c842037b5e90f373 /lib/std/json.zig
parent90f2a8d9c5885cdb302757244a5bb2971fdbabe0 (diff)
parent8937f18a6f8496e011b13cb086b7948b5f1d540e (diff)
downloadzig-3eb29f15f537ee79df8f2c4afa0db94ce6137d4c.tar.gz
zig-3eb29f15f537ee79df8f2c4afa0db94ce6137d4c.zip
Merge pull request #10849 from sharpobject/sharpobject_fix_json_comptime_fields
std.json: fix compile error for comptime fields
Diffstat (limited to 'lib/std/json.zig')
-rw-r--r--lib/std/json.zig2
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 {