fix break label check in rlExpr: use UINT32_MAX sentinel instead of 0 for optional token

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 16:37:50 +00:00
parent 4857895067
commit 455967af5a
2 changed files with 3 additions and 3 deletions

View File

@@ -18502,13 +18502,13 @@ static bool rlExpr(
// break (AstRlAnnotate.zig:566-596).
case AST_NODE_BREAK: {
uint32_t opt_label_tok = nd.lhs; // 0 = no label
uint32_t opt_label_tok = nd.lhs; // UINT32_MAX = no label
uint32_t rhs_node = nd.rhs; // 0 = void break
if (rhs_node == 0)
return false;
RlBlock* opt_cur_block = block;
if (opt_label_tok != 0) {
if (opt_label_tok != UINT32_MAX) {
// Labeled break: find matching block.
while (opt_cur_block != NULL) {
if (opt_cur_block->label_token != UINT32_MAX

View File

@@ -1320,7 +1320,7 @@ const corpus_files = .{
"../src/translate_c.zig",
"../src/Compilation.zig",
"../src/InternPool.zig",
//"../src/Sema.zig",
"../src/Sema.zig",
};
fn corpusCheck(gpa: Allocator, source: [:0]const u8) !void {