mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix issue with proc group cycles #176
This commit is contained in:
+4
-1
@@ -718,6 +718,10 @@ void check_proc_group_decl(Checker *c, Entity *pg_entity, DeclInfo *d) {
|
|||||||
|
|
||||||
array_init(&pge->entities, c->allocator, pg->args.count);
|
array_init(&pge->entities, c->allocator, pg->args.count);
|
||||||
|
|
||||||
|
// NOTE(bill): This must be set here to prevent cycles in checking if someone
|
||||||
|
// places the entity within itself
|
||||||
|
pg_entity->type = t_invalid;
|
||||||
|
|
||||||
PtrSet<Entity *> entity_map = {};
|
PtrSet<Entity *> entity_map = {};
|
||||||
ptr_set_init(&entity_map, heap_allocator());
|
ptr_set_init(&entity_map, heap_allocator());
|
||||||
defer (ptr_set_destroy(&entity_map));
|
defer (ptr_set_destroy(&entity_map));
|
||||||
@@ -815,7 +819,6 @@ void check_proc_group_decl(Checker *c, Entity *pg_entity, DeclInfo *d) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pg_entity->type = t_invalid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void check_entity_decl(Checker *c, Entity *e, DeclInfo *d, Type *named_type) {
|
void check_entity_decl(Checker *c, Entity *e, DeclInfo *d, Type *named_type) {
|
||||||
|
|||||||
+1
-1
@@ -60,7 +60,7 @@ Type * make_optional_ok_type (gbAllocator a, Type *value);
|
|||||||
void check_type_decl (Checker *c, Entity *e, AstNode *type_expr, Type *def, bool alias);
|
void check_type_decl (Checker *c, Entity *e, AstNode *type_expr, Type *def, bool alias);
|
||||||
Entity * check_selector (Checker *c, Operand *operand, AstNode *node, Type *type_hint);
|
Entity * check_selector (Checker *c, Operand *operand, AstNode *node, Type *type_hint);
|
||||||
Entity * check_ident (Checker *c, Operand *o, AstNode *n, Type *named_type, Type *type_hint, bool allow_import_name);
|
Entity * check_ident (Checker *c, Operand *o, AstNode *n, Type *named_type, Type *type_hint, bool allow_import_name);
|
||||||
Entity * find_polymorphic_struct_entity(Checker *c, Type *original_type, isize param_count, Array<Operand> ordered_operands);
|
Entity * find_polymorphic_struct_entity (Checker *c, Type *original_type, isize param_count, Array<Operand> ordered_operands);
|
||||||
void check_not_tuple (Checker *c, Operand *operand);
|
void check_not_tuple (Checker *c, Operand *operand);
|
||||||
void convert_to_typed (Checker *c, Operand *operand, Type *target_type);
|
void convert_to_typed (Checker *c, Operand *operand, Type *target_type);
|
||||||
gbString expr_to_string (AstNode *expression);
|
gbString expr_to_string (AstNode *expression);
|
||||||
|
|||||||
Reference in New Issue
Block a user