Skip to main content

luaur_analysis/functions/
is.rs

1//! Source: `Analysis/include/Luau/Type.h:1077-1087` (hand-ported)
2use crate::type_aliases::type_id::TypeId;
3
4/// C++ `template<typename... Ts, typename T> bool is(T&& tv)` — tests whether
5/// `tv`'s variant holds any of `Ts...` (`get<Ts>(tv) || ...`). The Rust port
6/// resolves variant membership per-type via `match`/get-if traits, so every
7/// caller is monomorphized to a concrete predicate; this unbounded template
8/// generic over `Type` has no call site.
9pub fn is<T>(_tv: TypeId) -> bool {
10    unreachable!("C++ Type `is<Ts...>` variant-membership template; Rust callers use monomorphized match/get_if — no call site")
11}