aboutsummaryrefslogtreecommitdiff
path: root/src/compile/functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compile/functions.c')
-rw-r--r--src/compile/functions.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compile/functions.c b/src/compile/functions.c
index 01377a89..f62e00f8 100644
--- a/src/compile/functions.c
+++ b/src/compile/functions.c
@@ -633,6 +633,7 @@ static void check_unused_vars(env_t *env, arg_ast_t *args, ast_t *body) {
// Global/file scoped vars are okay to mutate without reading
if (get_binding(env, entry->name) != NULL) continue;
ast_t *var = Table$str_get(assigned_vars, entry->name);
+ assert(var);
code_err(var, "This variable was assigned to, but never read from.");
}
}