projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34a5aee
)
bugfix with polymorphic structure parameter types
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Fri, 15 Apr 2022 02:01:47 +0000
(21:01 -0500)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Fri, 15 Apr 2022 02:01:47 +0000
(21:01 -0500)
src/symres.c
patch
|
blob
|
history
diff --git
a/src/symres.c
b/src/symres.c
index c4f6659e4c06404642b30b7357ffdd30beee2652..3d4f9f29d7ecc81cbf3e13423b867c8b3557f65a 100644
(file)
--- a/
src/symres.c
+++ b/
src/symres.c
@@
-191,6
+191,14
@@
static SymresStatus symres_type(AstType** type) {
bh_arr_each(AstPolyStructParam, param, pst_node->poly_params) {
SYMRES(type, ¶m->type_node);
param->type = type_build_from_ast(context.ast_alloc, param->type_node);
+ if (param->type == NULL) {
+ if (context.cycle_detected) {
+ onyx_report_error(param->token->pos, Error_Waiting_On, "Waiting for parameter type to be known.");
+ return Symres_Error;
+ } else {
+ return Symres_Yield_Macro;
+ }
+ }
}
break;
}