Skip to content

Commit 9f04b91

Browse files
authored
Add Bool special form to handle type expressions in boolean contexts (#31)
- Add `_LiteralGeneric` as the resulting type of `IsSub` and other `<type-bool>`. This handles execution in boolean contexts. - Add `Matches[Lhs, Rhs]` which is equivalent to `IsSub[Lhs,Rhs] and IsSub[Rhs,Lhs]` - Add `Bool` which converts `Literal` to `_LiteralGeneric` (eg. `Bool[Literal[False]]` - Add `AllOf`, which checks that all elements of a `<variadic-type-arg> +` are one of `Literal[True]` or `_LiteralGeneric[True]`. - Add `AnyOf`, which checks that any element of a `<variadic-type-arg> +` is one of `Literal[True]` or `_LiteralGeneric[True]`.
1 parent 5fc47eb commit 9f04b91

4 files changed

Lines changed: 566 additions & 10 deletions

File tree

0 commit comments

Comments
 (0)