diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2019-10-31 22:23:49 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2019-10-31 22:23:49 -0400 |
commit | 21b42cd9099d25b89f20789bf75f0833f2a5a980 (patch) | |
tree | 6917d0b486bd037b68ef136b60812b3ec461cf7d /types.c | |
parent | ebed63c4771e83d640ffef3bbcec980f98212365 (diff) |
fixed the bug (but i'm not happy about the solution)
Diffstat (limited to 'types.c')
-rw-r--r-- | types.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1200,10 +1200,6 @@ static bool types_decl(Typer *tr, Declaration *d) { success = false; goto ret; } - } else { - /* if we can't find the type, default to unknown */ - d->type.flags = 0; - d->type.kind = TYPE_UNKNOWN; } if (d->flags & DECL_FLAG_HAS_EXPR) { if (!types_expr(tr, &d->expr)) { @@ -1272,6 +1268,7 @@ static bool types_decl(Typer *tr, Declaration *d) { /* use unknown type if we didn't get the type */ d->type.flags = 0; d->type.kind = TYPE_UNKNOWN; + tr->evalr->enabled = false; /* disable evaluator completely so that it doesn't accidentally try to access this declaration */ } arr_remove_last(&tr->in_decls); return success; |