diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-17 15:17:13 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-17 15:17:13 -0400 |
| commit | aaa51fc734dde35ab8109bad04e478cdf4fff950 (patch) | |
| tree | 94b8d8e0d38ae055ff6aa009763c63c1b1b92c48 /typecheck.c | |
| parent | 2d5c8c3124dfe82c983bc91b62ed4b69be3fc647 (diff) | |
Perform topological ordering when compiling typedefs so users don't need
to think about ordering their definitions.
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/typecheck.c b/typecheck.c index eefd92b5..ab64bbf3 100644 --- a/typecheck.c +++ b/typecheck.c @@ -303,8 +303,8 @@ void bind_statement(env_t *env, ast_t *statement) code_err(field_ast->type, "This is a recursive struct that would be infinitely large. Maybe you meant to use an optional '@%T?' pointer instead?", type); else code_err(field_ast->type, "I'm still in the process of defining the fields of %T, so I don't know how to use it as a member." - "\nTry using a @%T pointer for this field or moving the definition of %T before %T in the file.", - field_t, field_t, field_t, type); + "\nTry using a @%T pointer for this field.", + field_t, field_t); } fields = new(arg_t, .name=field_ast->name, .type=field_t, .default_val=field_ast->value, .next=fields); } @@ -335,8 +335,8 @@ void bind_statement(env_t *env, ast_t *statement) code_err(field_ast->type, "This is a recursive enum that would be infinitely large. Maybe you meant to use an optional '@%T?' pointer instead?", type); else code_err(field_ast->type, "I'm still in the process of defining the fields of %T, so I don't know how to use it as a member." - "\nTry using a @%T pointer for this field or moving the definition of %T before %T in the file.", - field_t, field_t, field_t, type); + "\nTry using a @%T pointer for this field.", + field_t, field_t); } fields = new(arg_t, .name=field_ast->name, .type=field_t, .default_val=field_ast->value, .next=fields); } |
