aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorxackus <14938807+xackus@users.noreply.github.com>2020-03-09 19:36:15 +0100
committerxackus <14938807+xackus@users.noreply.github.com>2020-03-09 22:33:18 +0100
commite7cc45642138472c29e09cd10e31962426c1aba5 (patch)
tree24c9aad00056e2a31e7d1509d9f4924fc77c3222 /src/analyze.cpp
parent7782c76bee0201227be730ae131171939f728538 (diff)
downloadzig-e7cc45642138472c29e09cd10e31962426c1aba5.tar.gz
zig-e7cc45642138472c29e09cd10e31962426c1aba5.zip
better error messages and more tests
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 638a31ab5a..89e64ec540 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -1957,7 +1957,7 @@ static ZigType *analyze_fn_type(CodeGen *g, AstNode *proto_node, Scope *child_sc
if(!is_valid_return_type(specified_return_type)){
ErrorMsg* msg = add_node_error(g, fn_proto->return_type,
- buf_sprintf("return type '%s' not allowed", buf_ptr(&specified_return_type->name)));
+ buf_sprintf("%s return type '%s' not allowed", type_id_name(specified_return_type->id), buf_ptr(&specified_return_type->name)));
Tld *tld = find_decl(g, &fn_entry->fndef_scope->base, &specified_return_type->name);
if (tld != nullptr) {
add_error_note(g, msg, tld->source_node, buf_sprintf("type declared here"));