aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted/type.zig
diff options
context:
space:
mode:
authorSahnvour <Sahnvour@users.noreply.github.com>2020-09-02 08:52:32 +0200
committerGitHub <noreply@github.com>2020-09-02 08:52:32 +0200
commit90ace40e07de7bca2558da72e6d67cf660f86192 (patch)
treeb3cc13576ad7d9fc94a80776aa4008316c0ff746 /src-self-hosted/type.zig
parent1b2154dfe2f9b5030f487e7c4be8c706ce6e59b5 (diff)
parent575fbd5e3592cff70cbfc5153884d919e6bed89f (diff)
downloadzig-90ace40e07de7bca2558da72e6d67cf660f86192.tar.gz
zig-90ace40e07de7bca2558da72e6d67cf660f86192.zip
Merge pull request #5999 from Sahnvour/hashmap
New hashmap implementation
Diffstat (limited to 'src-self-hosted/type.zig')
-rw-r--r--src-self-hosted/type.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src-self-hosted/type.zig b/src-self-hosted/type.zig
index 13024f34de..a9a1acf44b 100644
--- a/src-self-hosted/type.zig
+++ b/src-self-hosted/type.zig
@@ -238,7 +238,7 @@ pub const Type = extern union {
}
}
- pub fn hash(self: Type) u32 {
+ pub fn hash(self: Type) u64 {
var hasher = std.hash.Wyhash.init(0);
const zig_type_tag = self.zigTypeTag();
std.hash.autoHash(&hasher, zig_type_tag);
@@ -303,7 +303,7 @@ pub const Type = extern union {
// TODO implement more type hashing
},
}
- return @truncate(u32, hasher.final());
+ return hasher.final();
}
pub fn copy(self: Type, allocator: *Allocator) error{OutOfMemory}!Type {