mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-02 19:22:33 +00:00
Fix nil comparisons for soa slices and dynamic arrays
This commit is contained in:
@@ -1585,6 +1585,13 @@ bool type_has_nil(Type *t) {
|
||||
case Type_Union:
|
||||
return !t->Union.no_nil;
|
||||
case Type_Struct:
|
||||
if (is_type_soa_struct(t)) {
|
||||
switch (t->Struct.soa_kind) {
|
||||
case StructSoa_Fixed: return false;
|
||||
case StructSoa_Slice: return true;
|
||||
case StructSoa_Dynamic: return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case Type_Opaque:
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user