luaur_analysis/functions/
is_empty.rs1use crate::functions::follow_type_pack::follow_type_pack_id;
5use crate::records::type_pack::TypePack;
6use crate::type_aliases::type_pack_id::TypePackId;
7use crate::type_aliases::type_pack_variant::TypePackVariantMember;
8
9pub fn is_empty(tp: TypePackId) -> bool {
10 unsafe {
11 let tp = follow_type_pack_id(tp);
12 if let Some(tpp) = TypePack::get_if(&(*tp).ty) {
13 return tpp.head.is_empty()
14 && match tpp.tail {
15 Some(tail) => is_empty(tail),
16 None => true,
17 };
18 }
19
20 false
21 }
22}