mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
maybe property does not exist anymore
In commit 3ec70c5517, the `#maybe`
functionality was merged with the standard 'union' functionality, and
thus, the `maybe` property was removed.
This commit is contained in:
@@ -146,7 +146,7 @@ reflect_args_structure :: proc(ctx: ^Flag_Context, v: any) -> Flag_Error {
|
|||||||
type := types[i];
|
type := types[i];
|
||||||
|
|
||||||
if named_type, ok := type.variant.(Type_Info_Named); ok {
|
if named_type, ok := type.variant.(Type_Info_Named); ok {
|
||||||
if union_type, ok := named_type.base.variant.(Type_Info_Union); ok && union_type.maybe && len(union_type.variants) == 1 {
|
if union_type, ok := named_type.base.variant.(Type_Info_Union); ok && len(union_type.variants) == 1 {
|
||||||
flag.optional = true;
|
flag.optional = true;
|
||||||
flag.tag_ptr = rawptr(uintptr(union_type.tag_offset) + uintptr(v.data) + uintptr(offsets[i]));
|
flag.tag_ptr = rawptr(uintptr(union_type.tag_offset) + uintptr(v.data) + uintptr(offsets[i]));
|
||||||
type = union_type.variants[0];
|
type = union_type.variants[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user