From e8bcdca044603fb5ea93fc94028dfd8bdd22fcf3 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Thu, 1 Jun 2023 21:03:53 -0400 Subject: Sema: fix in-memory coercion during comptime load --- src/value.zig | 1 + 1 file changed, 1 insertion(+) (limited to 'src/value.zig') diff --git a/src/value.zig b/src/value.zig index 8b68dd8b55..6a19678d71 100644 --- a/src/value.zig +++ b/src/value.zig @@ -1842,6 +1842,7 @@ pub const Value = struct { pub fn elemValue(val: Value, mod: *Module, index: usize) Allocator.Error!Value { return switch (val.ip_index) { .none => switch (val.tag()) { + .bytes => try mod.intValue(Type.u8, val.castTag(.bytes).?.data[index]), .repeated => val.castTag(.repeated).?.data, .aggregate => val.castTag(.aggregate).?.data[index], .slice => val.castTag(.slice).?.data.ptr.elemValue(mod, index), -- cgit v1.2.3