summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-02-26 18:39:29 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-02-26 18:39:29 -0500
commit03b405750adff0e156f344fd4ab02dd5c6bc4da0 (patch)
treef798a1c6fc191a427369cf4f8dd2ed4076c257de /types.c
parente9aab51e78493adb3ccd99ff671d6bac5d16d10c (diff)
moved errors from cgen to types.c
Diffstat (limited to 'types.c')
-rw-r--r--types.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/types.c b/types.c
index 75f8f8a..f8f544b 100644
--- a/types.c
+++ b/types.c
@@ -2783,6 +2783,10 @@ static Status types_decl(Typer *tr, Declaration *d) {
success = false;
goto ret;
}
+ } else if (d->type.kind == TYPE_UNKNOWN) {
+ err_print(d->where, "Can't determine type of declaration.");
+ success = false;
+ goto ret;
}
if (d->flags & DECL_IS_CONST) {
if (d->type.kind == TYPE_PTR) {