Skip to content

Commit

Permalink
Fix bytecode serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
bgk- committed Dec 6, 2024
1 parent d50f796 commit 8167dfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/bytecode.zig
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub const Bytecode = struct {

pub fn serialize(self: *Bytecode, seekable: anytype) !void {
var writer = seekable.writer();
const isSeekable = @hasField(@TypeOf(seekable.*), "getPos");
const isSeekable = @hasDecl(@TypeOf(seekable.*), "getPos");
const headerPos = if (isSeekable) try seekable.getPos() else 0;
var section: u8 = 0;
// globals, boughs, instructions, debug info, constants, uuids, loc
Expand Down

0 comments on commit 8167dfe

Please # to comment.