diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-12 13:17:48 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-12 13:17:48 +0200 |
| commit | 2d8691cfef92edf31da746668fd2da3c1fa5043c (patch) | |
| tree | 0da07f8c72a8c842eae1af86eecea11d4fe6549b /src | |
| parent | 67af2eead2b9424ba311ef208cd45df839c3efbe (diff) | |
| download | ek-2d8691cfef92edf31da746668fd2da3c1fa5043c.tar.gz ek-2d8691cfef92edf31da746668fd2da3c1fa5043c.zip | |
highlight flaws in current unification system
Diffstat (limited to 'src')
| -rw-r--r-- | src/actualize.c | 3 | ||||
| -rw-r--r-- | src/debug.c | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/actualize.c b/src/actualize.c index 2cb2f7a..a6155b9 100644 --- a/src/actualize.c +++ b/src/actualize.c @@ -2194,6 +2194,9 @@ static int actualize_trait(struct act_state *state, struct scope *scope, if (exists) continue; + if (analyze_visibility(trait_scope, n)) + return -1; + if (actualize_proc_sign(trait_scope, n)) return -1; } diff --git a/src/debug.c b/src/debug.c index 0908ee5..0e29efc 100644 --- a/src/debug.c +++ b/src/debug.c @@ -304,13 +304,14 @@ static void _type_str(FILE *fp, struct type *type) case TYPE_STRUCT: { struct ast *def = type->d; - if (struct_id(def)) { - fprintf(fp, "%s", struct_id(def)); + struct ast *base = chain_base(def); + if (struct_id(base)) { + fprintf(fp, "%s", struct_id(base)); } - if (struct_params(def)) { + if (struct_params(base)) { fprintf(fp, "!["); - _param_str(fp, struct_params(def)); + _param_str(fp, struct_params(base)); fprintf(fp, "]"); } break; |
