aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-08-03 21:21:56 +0100
committerGinger Bill <bill@gingerbill.org>2017-08-03 21:21:56 +0100
commit49d337c83039715fd3100f6ec8a88dff80c08c4b (patch)
treef129486fb80a44dc106a277a576438d0ce344d8c /src/check_expr.cpp
parent294092979e89faa67dc77d2261e9ddafc18b0d0d (diff)
v0.6.2; Use Ada_Case for typesv0.6.2
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index df2fe185e..c33d59bcf 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -8136,7 +8136,9 @@ ExprKind check_expr_base_internal(Checker *c, Operand *o, AstNode *node, Type *t
o->type = t->Pointer.elem;
} else {
gbString str = expr_to_string(o->expr);
- error(o->expr, "Cannot dereference `%s`", str);
+ gbString typ = type_to_string(o->type);
+ error(o->expr, "Cannot dereference `%s` of type `%s`", str, typ);
+ gb_string_free(typ);
gb_string_free(str);
o->mode = Addressing_Invalid;
o->expr = node;