diff options
| author | gingerBill <bill@gingerbill.org> | 2022-05-23 12:04:19 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-05-23 12:04:19 +0100 |
| commit | 3ec70c5517062f3d35822253b2072df696b0c55f (patch) | |
| tree | 12e5377283b627e246f77e19fed33220b06c0830 /core/encoding | |
| parent | d9f293b2818b30ebe2d29180aa62c3ce432c4582 (diff) | |
Merge functionality of `#maybe` with the standard 'union' functionality
Diffstat (limited to 'core/encoding')
| -rw-r--r-- | core/encoding/json/unmarshal.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/encoding/json/unmarshal.odin b/core/encoding/json/unmarshal.odin index bd48011f1..2ff268a21 100644 --- a/core/encoding/json/unmarshal.odin +++ b/core/encoding/json/unmarshal.odin @@ -209,7 +209,7 @@ unmarshal_value :: proc(p: ^Parser, v: any) -> (err: Unmarshal_Error) { variant := u.variants[0] v.id = variant.id ti = reflect.type_info_base(variant) - if !(u.maybe && reflect.is_pointer(variant)) { + if !reflect.is_pointer_internally(variant) { tag := any{rawptr(uintptr(v.data) + u.tag_offset), u.tag_type.id} assign_int(tag, 1) } |