Skip to main content

luaur_analysis/records/
unifier.rs

1//! Source: `Analysis/include/Luau/Unifier.h` (hand-ported; fields only)
2
3use crate::enums::variance::Variance;
4use crate::records::builtin_types::BuiltinTypes;
5use crate::records::count_mismatch::CountMismatchContext;
6use crate::records::normalizer::Normalizer;
7use crate::records::scope::Scope;
8use crate::records::txn_log::TxnLog;
9use crate::records::type_arena::TypeArena;
10use crate::records::unifier_shared_state::UnifierSharedState;
11use crate::type_aliases::error_vec::ErrorVec;
12use crate::type_aliases::type_id::TypeId;
13use crate::type_aliases::type_pack_id::TypePackId;
14use alloc::vec::Vec;
15use luaur_ast::records::location::Location;
16
17#[derive(Debug)]
18pub struct Unifier {
19    pub types: *mut TypeArena,
20    pub builtin_types: *mut BuiltinTypes,
21    pub normalizer: *mut Normalizer,
22    pub scope: *mut Scope,
23    pub log: TxnLog,
24    pub failure: bool,
25    pub errors: ErrorVec,
26    pub location: Location,
27    pub variance: Variance,
28    pub normalize: bool,
29    pub check_inhabited: bool,
30    pub ctx: CountMismatchContext,
31    pub shared_state: *mut UnifierSharedState, // UnifierSharedState&
32    pub blocked_types: Vec<TypeId>,
33    pub blocked_type_packs: Vec<TypePackId>,
34    pub first_pack_error_pos: Option<i32>,
35}