summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-01-25 15:33:13 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-01-25 15:33:13 -0500
commit9df83e399d7691bb20cc9d42ddb70619908aeeca (patch)
tree1a31320443ff024d14e401656f4f90ca747b7e41 /types.c
parent27acf3754529988de9d43ba0abb8e5b3bbb3da31 (diff)
passing structs to foreign functions
Diffstat (limited to 'types.c')
-rw-r--r--types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types.c b/types.c
index 7a18c72..98d1958 100644
--- a/types.c
+++ b/types.c
@@ -822,7 +822,7 @@ static bool types_fn(Typer *tr, FnExpr *f, Type *t, Instance *instance) {
}
/* TODO: this should really be at the closing brace, and not the function declaration */
char *expected = type_to_str(ret_type);
- err_print(token_location(f->body.where.end), "No return value in function which returns %s.", expected);
+ err_print(token_location(f->body.where.file, f->body.where.end), "No return value in function which returns %s.", expected);
free(expected);
info_print(f->where, "Function was declared here:");
success = false;