mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-15 16:51:47 -04:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
commit
3a45aaa539
19 files changed
+534
-36
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user