cli: disambiguate block statement boundaries
This commit is contained in:
1 parent
462ddd2c5c
commit
911982dd1c
33 files changed
+465
-7
No files matched your search
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user