use crate::enums::polarity::Polarity;
use crate::records::constraint_generator::ConstraintGenerator;
use crate::records::scope::Scope;
use crate::type_aliases::type_id::TypeId;
use luaur_ast::records::ast_type::AstType;

impl ConstraintGenerator {
    pub fn resolve_type(
        &mut self,
        _scope: *mut Scope,
        ty: *mut AstType,
        in_type_arguments: bool,
        replace_error_with_fresh: bool,
        initial_polarity: Polarity,
    ) -> TypeId {
        // Reset the polarity
        self.polarity = initial_polarity;
        self.resolve_type_constraint_generator_alt_b(
            _scope,
            ty,
            in_type_arguments,
            replace_error_with_fresh,
        )
    }
}
