Skip to content

Commit babb9a8

Browse files
committed
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.
1 parent 21f9f37 commit babb9a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codegen/spirv/Assembler.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,12 +754,12 @@ fn parseContextDependentNumber(ass: *Assembler) !void {
754754
const id = entry.value_ptr.*;
755755
if (id != result_id) continue;
756756
const info = entry.key_ptr.*;
757-
switch (info.bits) {
757+
return switch (info.bits) {
758758
16 => try ass.parseContextDependentFloat(16),
759759
32 => try ass.parseContextDependentFloat(32),
760760
64 => try ass.parseContextDependentFloat(64),
761761
else => return ass.fail(tok.start, "cannot parse {}-bit info literal", .{info.bits}),
762-
}
762+
};
763763
}
764764
}
765765

0 commit comments

Comments
 (0)