diff options
| author | blob1807 <12388588+blob1807@users.noreply.github.com> | 2024-02-21 11:03:15 +1000 |
|---|---|---|
| committer | blob1807 <12388588+blob1807@users.noreply.github.com> | 2024-02-21 11:03:15 +1000 |
| commit | 7e0473dded188a18a19f5fc4aa9b45bc31934e0e (patch) | |
| tree | 0cbe19f395a706e5bf6370afc2f0bd7cdc1cf5ac /core/encoding | |
| parent | 004cd4933d2d80cd3416edc3feae585baff3a68b (diff) | |
Revert json union fix
Diffstat (limited to 'core/encoding')
| -rw-r--r-- | core/encoding/json/marshal.odin | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/core/encoding/json/marshal.odin b/core/encoding/json/marshal.odin index da250dc01..e9285364b 100644 --- a/core/encoding/json/marshal.odin +++ b/core/encoding/json/marshal.odin @@ -377,15 +377,6 @@ marshal_to_writer :: proc(w: io.Writer, v: any, opt: ^Marshal_Options) -> (err: opt_write_end(w, opt, '}') or_return case runtime.Type_Info_Union: - // check for empty unions - if len(info.variants) == 0 { - io.write_string(w, "null") or_return - return - } - if info.tag_type == nil { - panic("Union tag type is nil.") - } - tag_ptr := uintptr(v.data) + info.tag_offset tag_any := any{rawptr(tag_ptr), info.tag_type.id} |