luaur_analysis/methods/field_operator_eq.rs
1use crate::records::field::Field;
2use luaur_common::macros::luau_assert::LUAU_ASSERT;
3
4impl Field {
5 #[inline]
6 pub fn operator_eq(&self, rhs: &Field) -> bool {
7 LUAU_ASSERT!(self.parent.is_some() && rhs.parent.is_some());
8 self.key == rhs.key
9 && (self.parent == rhs.parent || self.parent.as_ref() == rhs.parent.as_ref())
10 }
11}