summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
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 c2b5437..fc88d82 100644
--- a/types.c
+++ b/types.c
@@ -2446,7 +2446,9 @@ static bool types_stmt(Typer *tr, Statement *s) {
char *filename = eval_expr_as_cstr(tr, &s->inc.filename, "import filename");
if (!filename)
return false;
- char *contents = read_entire_file(tr->allocr, tr->err_ctx, filename);
+ char *contents = read_entire_file(tr->allocr, filename, s->where);
+ if (!contents)
+ return false;
Tokenizer tokr;
tokr_create(&tokr, tr->idents, tr->err_ctx, tr->allocr);
File *file = typer_calloc(tr, 1, sizeof *file);