Sema: fix in-memory coercion during comptime load
This commit is contained in:
committed by
Andrew Kelley
parent
dc18739a73
commit
e8bcdca044
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user