luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::records::field::Field;
use luaur_common::macros::luau_assert::LUAU_ASSERT;

impl Field {
    #[inline]
    pub fn operator_eq(&self, rhs: &Field) -> bool {
        LUAU_ASSERT!(self.parent.is_some() && rhs.parent.is_some());
        self.key == rhs.key
            && (self.parent == rhs.parent || self.parent.as_ref() == rhs.parent.as_ref())
    }
}