Can anyone give me a hand with this compile error please? Thanks
pub fn getType(value: *Value, unit: *Unit) Type.Index {
return switch (value.*) {
.type => Type.Index.type,
.bool => Type.Index.comptime_bool,
.copy => |value_index| b: {
const v = unit.values.get(value_index);
@compileLog(@TypeOf(v), @TypeOf(value));
break :b v.getType(unit);
},
// .file => Type.Index.type,
else => |t| @panic(@tagName(t)),
};
}
bootstrap/Compilation.zig:4851:27: error: no field or member function named 'getType' in 'Compilation.Value'
break :b v.getType(unit);
~^~~~~~~~
bootstrap/Compilation.zig:4810:15: note: union declared here
const Value = union(enum) {
^~~~~
referenced by:
referenceDeclaration: bootstrap/Compilation.zig:6124:66
resolveFieldAccess: bootstrap/Compilation.zig:5247:32
remaining reference traces hidden; use '-freference-trace' to see all reference traces
Compile Log Output:
@as(type, *Compilation.Value), @as(type, *Compilation.Value)```