Describe the Bug
It looks like Pyrefly concludes that A | B is a type alias when both A and B are unknown, e.g.
def test(x, y):
reveal_type(x | y) # => type[Any]
This is not particularly helpful, since it could lead to type errors downstream, continuing the example
def f(x: int): ...
def test(x, y):
f(x | y)
which produces
ERROR Argument `type[Any]` is not assignable to parameter `z` with type `int` in function `f` [bad-argument-type]
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
Describe the Bug
It looks like Pyrefly concludes that
A | Bis a type alias when bothAandBare unknown, e.g.This is not particularly helpful, since it could lead to type errors downstream, continuing the example
which produces
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response