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::constraint::Constraint;
use crate::records::dcr_logger::DcrLogger;
use crate::type_aliases::constraint_block_target::ConstraintBlockTarget;
use luaur_common::records::variant::Variant3;

impl DcrLogger {
    pub fn pop_block_not_null_constraint(&mut self, block: *const Constraint) {
        for (_, list) in self.constraint_blocks.iter_mut() {
            list.retain(|target| {
                if let ConstraintBlockTarget::V2(target_block) = target {
                    *target_block != block
                } else {
                    true
                }
            });
        }
    }
}