diff options
| author | Sahnvour <Sahnvour@users.noreply.github.com> | 2020-09-02 08:52:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-02 08:52:32 +0200 |
| commit | 90ace40e07de7bca2558da72e6d67cf660f86192 (patch) | |
| tree | b3cc13576ad7d9fc94a80776aa4008316c0ff746 /src-self-hosted/type.zig | |
| parent | 1b2154dfe2f9b5030f487e7c4be8c706ce6e59b5 (diff) | |
| parent | 575fbd5e3592cff70cbfc5153884d919e6bed89f (diff) | |
| download | zig-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.zig | 4 |
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 { |
