Files
zig/test/cases/compile_errors/labeled_block_implicit_value.zig
mlugg bbbc95afd0 AstGen: add missing rvalue call to labeledBlockExpr
...and fix a minor x86_64 backend bug exposed by this fix.

Resolves: #21974
2024-11-12 14:51:10 +00:00

11 lines
172 B
Zig

export fn foo() void {
const result: u32 = b: {
if (false) break :b 1;
};
_ = result;
}
// error
//
// :2:28: error: expected type 'u32', found 'void'