aboutsummaryrefslogtreecommitdiff
path: root/src/value.zig
diff options
context:
space:
mode:
authorVexu <git@vexu.eu>2020-10-12 12:20:32 +0300
committerVexu <git@vexu.eu>2020-10-30 15:58:11 +0200
commit27d233cef76f9ae3086a6ec5e33c347e2af64796 (patch)
tree07b5b2279f50eb8c1e65951e6962b5d8c078bed1 /src/value.zig
parentad32e46bceb03c0b0d67fe73e0de0e308f0675e6 (diff)
downloadzig-27d233cef76f9ae3086a6ec5e33c347e2af64796.tar.gz
zig-27d233cef76f9ae3086a6ec5e33c347e2af64796.zip
stage2: basic switch validation
Diffstat (limited to 'src/value.zig')
-rw-r--r--src/value.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/value.zig b/src/value.zig
index e8fe848d5d..a7c3afbd6b 100644
--- a/src/value.zig
+++ b/src/value.zig
@@ -1242,6 +1242,10 @@ pub const Value = extern union {
return compare(a, .eq, b);
}
+ pub fn hash(a: Value) u64 {
+ @panic("TODO Value.hash");
+ }
+
/// Asserts the value is a pointer and dereferences it.
/// Returns error.AnalysisFail if the pointer points to a Decl that failed semantic analysis.
pub fn pointerDeref(self: Value, allocator: *Allocator) error{ AnalysisFail, OutOfMemory }!Value {