Skip to content

Commit

Permalink
fix type parsing when complex type gets ord
Browse files Browse the repository at this point in the history
  • Loading branch information
annacrombie committed Jan 8, 2024
1 parent 268cf3a commit 07afc9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lang/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ parse_type(struct parser *p, type_tag *type, bool top_level)
return false;
}

if (ord_type & TYPE_TAG_COMPLEX) {
if ((ord_type & TYPE_TAG_COMPLEX) || (*type & TYPE_TAG_COMPLEX)) {
*type = make_complex_type(p->wk, complex_type_or, *type, ord_type);
} else {
*type |= ord_type;
Expand Down
2 changes: 1 addition & 1 deletion src/lang/workspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ workspace_init_bare(struct workspace *wk)
[obj_generated_list] = { sizeof(struct obj_generated_list), 16 },
[obj_alias_target] = { sizeof(struct obj_alias_target), 4 },
[obj_both_libs] = { sizeof(struct obj_both_libs), 4 },
[obj_typeinfo] = { sizeof(struct obj_typeinfo), 4 },
[obj_typeinfo] = { sizeof(struct obj_typeinfo), 32 },
[obj_func] = { sizeof(struct obj_func), 4 },
[obj_source_set] = { sizeof(struct obj_source_set), 4 },
[obj_source_configuration] = { sizeof(struct obj_source_configuration), 4 },
Expand Down

0 comments on commit 07afc9d

Please sign in to comment.