From 3951b93d0a1f68b0c7ed1a32324f72e5cdc253fb Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 15 Mar 2020 14:27:54 +0000 Subject: Fix branch statements within inline for blocks (partial hack) --- src/check_stmt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/check_stmt.cpp') diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 4b250c6a6..67172d951 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1692,12 +1692,12 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) { switch (token.kind) { case Token_break: if ((flags & Stmt_BreakAllowed) == 0 && bs->label == nullptr) { - error(token, "'break' only allowed in loops or 'switch' statements"); + error(token, "'break' only allowed in non-inline loops or 'switch' statements"); } break; case Token_continue: if ((flags & Stmt_ContinueAllowed) == 0 && bs->label == nullptr) { - error(token, "'continue' only allowed in loops"); + error(token, "'continue' only allowed in non-inline loops"); } break; case Token_fallthrough: -- cgit v1.2.3