Describe the Bug
from typing import *
def raise_error() -> NoReturn:
raise Exception()
a = cast(int | None, 1)
if a is None:
raise_error()
reveal_type(a) # revealed type: int | None
I expect a to be narrowed to int.
Sandbox Link
https://pyrefly.org/sandbox/?code=GYJw9gtgBALgngBwJYDsDmUkQWEMoBUAUEQCYCmwUIAhkgM7kD65I4IAFAJRQC0AfFAByYAErkYAVxAoAXESiLqdRlACiADwDG5BDCRgU3EjSgBeKFpr0YHVPgA+ww+QA0UAIxciSKqYbOKOTySsoMzKzsxkQg5ABu5DQANkzwCOQcNFxAA
(Only applicable for extension issues) IDE Information
No response
Describe the Bug
I expect
ato be narrowed toint.Sandbox Link
https://pyrefly.org/sandbox/?code=GYJw9gtgBALgngBwJYDsDmUkQWEMoBUAUEQCYCmwUIAhkgM7kD65I4IAFAJRQC0AfFAByYAErkYAVxAoAXESiLqdRlACiADwDG5BDCRgU3EjSgBeKFpr0YHVPgA+ww+QA0UAIxciSKqYbOKOTySsoMzKzsxkQg5ABu5DQANkzwCOQcNFxAA
(Only applicable for extension issues) IDE Information
No response