summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-10-31 22:42:31 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2019-10-31 22:42:31 -0400
commitcc33de45174358c13eea4fecaa5f10b094048020 (patch)
tree0d6767ac52a492f9afd093bf72ace8601370e1ac /types.c
parent21b42cd9099d25b89f20789bf75f0833f2a5a980 (diff)
fixed some bugs involving trying to call future functions at compile time; not done yet
Diffstat (limited to 'types.c')
-rw-r--r--types.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/types.c b/types.c
index ba82ed0..b64fb36 100644
--- a/types.c
+++ b/types.c
@@ -294,7 +294,9 @@ static bool type_of_ident(Typer *tr, Location where, Identifier i, Type *t) {
info_print(d->where, "%s will be declared here.", s);
free(s);
} else {
- err_print(d->where, "Declaration type not found yet, even though it has passed.\nThis should not happen.");
+ /* let's type the declaration, and redo this (for evaling future functions) */
+ if (!types_decl(tr, d)) return false;
+ return type_of_ident(tr, where, i, t);
}
return false;
}