mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
check for nullptr when evaluating untypedness
This commit is contained in:
@@ -1257,6 +1257,9 @@ bool is_type_typed(Type *t) {
|
|||||||
}
|
}
|
||||||
bool is_type_untyped(Type *t) {
|
bool is_type_untyped(Type *t) {
|
||||||
t = base_type(t);
|
t = base_type(t);
|
||||||
|
if (t == nullptr) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (t->kind == Type_Basic) {
|
if (t->kind == Type_Basic) {
|
||||||
return (t->Basic.flags & BasicFlag_Untyped) != 0;
|
return (t->Basic.flags & BasicFlag_Untyped) != 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user