diff options
Diffstat (limited to 'src/value.zig')
| -rw-r--r-- | src/value.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/value.zig b/src/value.zig index 50e3fc8061..35d144f912 100644 --- a/src/value.zig +++ b/src/value.zig @@ -602,6 +602,11 @@ pub const Value = struct { return result; } + pub fn toIntern(val: Value) InternPool.Index { + assert(val.ip_index != .none); + return val.ip_index; + } + /// Asserts that the value is representable as a type. pub fn toType(self: Value) Type { if (self.ip_index != .none) return self.ip_index.toType(); |
