cli: disambiguate block statement boundaries

This commit is contained in:
dev committed 2026-10-07 18:21:07 +03:00
1 parent 462ddd2c5c
commit 911982dd1c
33 files changed
+465 -7

No files matched your search

+1 -1
View File
@@ -1184,7 +1184,7 @@ const Lowerer = struct {
},
.expr => |e| {
const v = try l.expr(e, null);
_ = v;
if (s.block_statement and v.ty != .void and v.ty != .never) return l.fail("E7006", s.span, "value-producing block statement: use `;` to discard the value or parentheses to continue the expression", &.{});
},
.@"while" => |x| try l.whileLoop(s.span, x.cond, x.body, null),
.loop => |b| try l.whileLoop(s.span, null, b, null),