Related:
What should be the expected revealed type here?
from typing_extensions import reveal_type
class A: ...
class B: ...
reveal_type(A | B) # revealed: `UnionType` or `type[A] | type[B]`?
Either way i think we must store the value of A | B as a Type::Union.
The way mypy handles this is it uses a uses_pep604_syntax flag in the UnionType class which allows it to reveal UnionType.
So, im not sure what the functionality should be