`Literal` had some known problems when used with `typing.Union` and `types.UnionType`. Example: https://github.com/python/cpython/issues/103592 I've covered `typing.Union`, see https://github.com/python/cpython/pull/103706 But, I forgot about `types.UnionType`. So, I will add this new test as a part of this issue. <!-- gh-linked-prs --> ### Linked PRs * gh-103747 * gh-103772 <!-- /gh-linked-prs -->