mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix #2304
This commit is contained in:
@@ -661,9 +661,10 @@ union_variant_typeid :: proc(a: any) -> typeid {
|
|||||||
case: unimplemented()
|
case: unimplemented()
|
||||||
}
|
}
|
||||||
|
|
||||||
if a.data != nil && tag != 0 {
|
if info.no_nil {
|
||||||
i := tag if info.no_nil else tag-1
|
return info.variants[tag].id
|
||||||
return info.variants[i].id
|
} else if tag != 0 {
|
||||||
|
return info.variants[tag-1].id
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user