luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::records::tarjan::Tarjan;
use crate::type_aliases::type_pack_id::TypePackId;

impl Tarjan {
    /// C++ `Tarjan::ignoreChildren(TypePackId)` (`Substitution.cpp:556-559`).
    ///
    /// The base returns `false`; concrete subclasses override it. Dispatches to
    /// the subclass override via the installed
    /// [`SubstitutionVtable`](crate::records::tarjan::SubstitutionVtable) when
    /// present, else the base-class default.
    pub fn ignore_children_type_pack_id(&mut self, tp: TypePackId) -> bool {
        let owner = self.vtable.owner;
        match self.vtable.ignore_children_tp {
            Some(f) => f(owner, tp),
            None => false,
        }
    }
}