aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-01-05 13:47:00 +0000
committergingerBill <bill@gingerbill.org>2024-01-05 13:47:00 +0000
commitd7d23e65eae616d44cc070edff8171eb3160b5b0 (patch)
treee1e4961377097f335ec061758a6c0ef02907ec7b /src/check_type.cpp
parent2820bbc269bb989052163544f2764bc4287254e4 (diff)
Clean up error block usage
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index f11418dc0..a95026711 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -2702,14 +2702,13 @@ gb_internal bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, T
check_expr_or_type(&c, &o, pt->type);
if (o.mode != Addressing_Invalid && o.mode != Addressing_Type) {
// NOTE(bill): call check_type_expr again to get a consistent error message
- begin_error_block();
+ ERROR_BLOCK();
elem = check_type_expr(&c, pt->type, nullptr);
if (o.mode == Addressing_Variable) {
gbString s = expr_to_string(pt->type);
error_line("\tSuggestion: ^ is used for pointer types, did you mean '&%s'?\n", s);
gb_string_free(s);
}
- end_error_block();
} else {
elem = o.type;
}