Files
Mikhail Golubevandintellij-monorepo-bot abe26b050d PY-76922 Add a barebone implementation of PyIntersectionType
For the time being, it's possible to declare an intersection type
as "A & B", though it should be either wrapped in a string literal,
used with `from __future__ import annotations` or with Python 3.14+
to avoid runtime errors (and there still be warnings about unresolved
`type.__and__`) and it's not possible to generate a type hint for them.
At least until intersection types are added to the typing specification,
or we adopt something similar to "ty_extensions".

Specific use cases, such as using intersections for type narrowing,
`super()`, overloads, etc. will be addressed separately.

Space-RevId: 16c28a020f0b102f54f56ae25b5c25dc143fd76d

GitOrigin-RevId: d2581559197819fbbc49e4f75b62aa2962924938
2026-01-26 17:03:32 +00:00
..