Skip to main content

luaur_analysis/methods/
magic_function_refine.rs

1use crate::records::magic_function::MagicFunction;
2use crate::records::magic_function_call_context::MagicFunctionCallContext;
3use crate::records::magic_function_type_check_context::MagicFunctionTypeCheckContext;
4use crate::records::magic_refinement_context::MagicRefinementContext;
5use alloc::sync::Arc;
6
7#[allow(dead_code)]
8pub(crate) fn magic_function_refine(_self: &MagicFunction, _context: &MagicRefinementContext) {
9    // In C++, MagicFunction::refine is virtual and has a default no-op implementation.
10    // In Rust, the vtable slot is represented by `MagicFunction` function pointers.
11    // Call the stored `refine` function pointer to preserve the original dispatch behavior.
12    (unsafe { _self.refine })(_context);
13}