luaur-analysis 0.1.1

Luau type checker and type inference (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::records::magic_function::MagicFunction;
use crate::records::magic_function_call_context::MagicFunctionCallContext;
use crate::records::magic_function_type_check_context::MagicFunctionTypeCheckContext;
use crate::records::magic_refinement_context::MagicRefinementContext;
use alloc::sync::Arc;

#[allow(dead_code)]
pub(crate) fn magic_function_refine(_self: &MagicFunction, _context: &MagicRefinementContext) {
    // In C++, MagicFunction::refine is virtual and has a default no-op implementation.
    // In Rust, the vtable slot is represented by `MagicFunction` function pointers.
    // Call the stored `refine` function pointer to preserve the original dispatch behavior.
    (unsafe { _self.refine })(_context);
}