This commit is contained in:
gingerBill committed 2026-10-02 23:40:30 +01:00
commit 3a45aaa539
19 files changed
+534 -36

No files matched your search

+11
View File
@@ -2617,6 +2617,9 @@ gb_internal bool is_type_polymorphic(Type *t, bool or_specialized=false) {
break;
case Type_Proc:
if (t->Proc.is_poly_specialized) {
return or_specialized;
}
if (t->Proc.is_polymorphic) {
return true;
}
@@ -2688,6 +2691,14 @@ gb_internal bool is_type_polymorphic(Type *t, bool or_specialized=false) {
return false;
}
// e.g. to name a procedure after its specialization
gb_internal bool is_type_polymorphic_or_specialized_proc(Type *t) {
if (t != nullptr && t->kind == Type_Proc && t->Proc.is_poly_specialized) {
return true;
}
return is_type_polymorphic(t);
}
gb_internal bool type_has_nil(Type *t) {
t = base_type(t);