aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index 3f1b9611c..0fe44289c 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -102,8 +102,13 @@ gb_internal void check_stmt_list(CheckerContext *ctx, Slice<Ast *> const &stmts,
new_flags |= Stmt_FallthroughAllowed;
}
+ u32 prev_stmt_flags = ctx->stmt_flags;
+ ctx->stmt_flags = new_flags;
+
check_stmt(ctx, n, new_flags);
+ ctx->stmt_flags = prev_stmt_flags;
+
if (i+1 < max_non_constant_declaration) {
switch (n->kind) {
case Ast_ReturnStmt: