From babb9a8b39cece95ff8390ecc39a79a84c261a43 Mon Sep 17 00:00:00 2001 From: xor-shift Date: Sat, 22 Nov 2025 13:34:58 +0300 Subject: [PATCH] src/codegen/spirv/Assembler.zig: fix OpConstant OpConstant with a floating point type argument fails to assemble with no disagnostics provided as there's (what seems to be) a missing return. --- src/codegen/spirv/Assembler.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codegen/spirv/Assembler.zig b/src/codegen/spirv/Assembler.zig index 5b19f960a7a4..6d1955cf9ac2 100644 --- a/src/codegen/spirv/Assembler.zig +++ b/src/codegen/spirv/Assembler.zig @@ -754,12 +754,12 @@ fn parseContextDependentNumber(ass: *Assembler) !void { const id = entry.value_ptr.*; if (id != result_id) continue; const info = entry.key_ptr.*; - switch (info.bits) { + return switch (info.bits) { 16 => try ass.parseContextDependentFloat(16), 32 => try ass.parseContextDependentFloat(32), 64 => try ass.parseContextDependentFloat(64), else => return ass.fail(tok.start, "cannot parse {}-bit info literal", .{info.bits}), - } + }; } }