mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
stage2: fix bug in ZIR gen of global comptime block
A global comptime block did not end with a break_inline instruction which caused an assertion to be hit.
This commit is contained in:
parent
ab5a445d25
commit
272fe0cbfe
@ -2513,6 +2513,7 @@ fn astgenAndSemaDecl(mod: *Module, decl: *Decl) !bool {
|
||||
|
||||
const block_expr = node_datas[decl_node].lhs;
|
||||
_ = try AstGen.comptimeExpr(&gen_scope, &gen_scope.base, .none, block_expr);
|
||||
_ = try gen_scope.addBreak(.break_inline, gen_scope.break_block, .void_value);
|
||||
|
||||
const code = try gen_scope.finish();
|
||||
if (std.builtin.mode == .Debug and mod.comp.verbose_ir) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user