Skip to main content

luaur_analysis/functions/
is_normalized_top.rs

1use crate::functions::get_type_alt_j::get_type_id;
2use crate::records::any_type::AnyType;
3use crate::records::never_type::NeverType;
4use crate::records::unknown_type::UnknownType;
5use crate::type_aliases::type_id::TypeId;
6
7pub fn is_normalized_top(ty: TypeId) -> bool {
8    unsafe {
9        !get_type_id::<NeverType>(ty).is_null()
10            || !get_type_id::<AnyType>(ty).is_null()
11            || !get_type_id::<UnknownType>(ty).is_null()
12    }
13}