Skip to main content

luaur_analysis/methods/
subtyping_reasoning_hash_operator_call.rs

1use crate::records::path_hash::PathHash;
2use crate::records::subtyping_reasoning::SubtypingReasoning;
3use crate::records::subtyping_reasoning_hash::SubtypingReasoningHash;
4
5impl SubtypingReasoningHash {
6    pub fn operator_call(&self, r: &SubtypingReasoning) -> usize {
7        let path_hash = PathHash;
8        path_hash.operator_call_6(&r.sub_path)
9            ^ (path_hash.operator_call_6(&r.super_path) << 1)
10            ^ ((r.variance as usize) << 1)
11            ^ ((r.is_property_modifier_violation as usize) << 2)
12    }
13}