aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-08-27 12:14:51 +0100
committergingerBill <bill@gingerbill.org>2021-08-27 12:14:51 +0100
commitb88e9452685f9e2c0d9dd1ba0609f5158252c45b (patch)
tree4622847a692a61d335571b1d6d92b8eb823e5b70 /src/check_stmt.cpp
parentbf56e3ea8dab1da71d54de320007147ae969b78f (diff)
`ERROR_BLOCK()` any usages of "Did you mean?" like behaviour whilst iterating across a scope entry map
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index 6fc098e6a..103ffa071 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -578,6 +578,8 @@ bool check_using_stmt_entity(CheckerContext *ctx, AstUsingStmt *us, Ast *expr, b
}
add_entity_use(ctx, expr, e);
+
+ ERROR_BLOCK();
switch (e->kind) {
case Entity_TypeName: {
@@ -2336,6 +2338,8 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
if (is_blank_ident(name)) {
error(token, "'using' cannot be applied variable declared as '_'");
} else if (is_type_struct(t) || is_type_raw_union(t)) {
+ ERROR_BLOCK();
+
Scope *scope = scope_of_node(t->Struct.node);
for_array(i, scope->elements.entries) {
Entity *f = scope->elements.entries[i].value;