aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-08 19:33:49 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-08 19:33:49 -0400
commitf86cc6549ff6075c3963fce819391d8d8d6960dc (patch)
tree53c6b3dafcdee1d129b09791c3e8b773ff1ac365 /typecheck.c
parent6d986e1f0419ff76e4ba4b83832a1ae6b7b6e890 (diff)
Bugfixes
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/typecheck.c b/typecheck.c
index 70d94dbf..5d3ffb48 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -263,6 +263,8 @@ void bind_statement(env_t *env, ast_t *statement)
bind_statement(env, decl->value);
}
type_t *type = get_type(env, decl->value);
+ if (!type)
+ code_err(decl->value, "I couldn't figure out the type of this value");
if (type->tag == FunctionType)
type = Type(ClosureType, type);
CORD prefix = namespace_prefix(env->libname, env->namespace);