mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-06 04:57:55 +00:00
Add new intrinsics for polymorphic records:
type_is_specialized_polymorphic_record, type_is_unspecialized_polymorphic_record, type_polymorphic_record_parameter_count, type_polymorphic_record_parameter_value
This commit is contained in:
@@ -1471,11 +1471,12 @@ Scope *polymorphic_record_parent_scope(Type *t) {
|
||||
}
|
||||
|
||||
bool is_type_polymorphic_record_specialized(Type *t) {
|
||||
Type *original_type = t;
|
||||
t = base_type(t);
|
||||
if (t->kind == Type_Struct) {
|
||||
return t->Struct.is_polymorphic && t->Struct.is_poly_specialized;
|
||||
return t->Struct.is_poly_specialized;
|
||||
} else if (t->kind == Type_Union) {
|
||||
return t->Union.is_polymorphic && t->Union.is_poly_specialized;
|
||||
return t->Union.is_poly_specialized;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user