diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-09 22:26:09 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-09 22:26:09 +0300 |
| commit | 0bee8234a52c9399544364e8d26b124cb487ce7c (patch) | |
| tree | e026b5482d740473c50055f4424eb87b362ddddc /src/ast.c | |
| parent | aa7ea13840e68abff8e9cf74376a6276f6a99033 (diff) | |
| download | ek-0bee8234a52c9399544364e8d26b124cb487ce7c.tar.gz ek-0bee8234a52c9399544364e8d26b124cb487ce7c.zip | |
fix trait expansion
+ Accidentally referenced an owned string, add strdup()
+ Didn't replace type IDs in ->t2
Diffstat (limited to 'src/ast.c')
| -rw-r--r-- | src/ast.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -291,12 +291,17 @@ void ast_dump(int depth, struct ast *n) depth++; if (n->t) { - printf(" ("); type_dump_list(n->t); printf(")"); + printf(" ("); + type_dump_list(n->t); + printf(")"); } if (n->t2) type_dump_list(n->t2); + if (n->scope) + printf(" {%llu}", (unsigned long long)n->scope->number); + printf("\n"); if (n->s) @@ -354,6 +359,12 @@ void type_dump(struct type *n) DUMP(TYPE_CALLABLE); DUMP(TYPE_TRAIT); } + + if (n->t1) + type_dump_list(n->t1); + + if (n->t0) + type_dump_list(n->t0); } void type_dump_list(struct type *root) |
