Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(🎁) Report unreachable when TypeGuard[Never] #16160

Open
KotlinIsland opened this issue Sep 22, 2023 · 0 comments · May be fixed by #17830
Open

(🎁) Report unreachable when TypeGuard[Never] #16160

KotlinIsland opened this issue Sep 22, 2023 · 0 comments · May be fixed by #17830
Labels
feature topic-reachability Detecting unreachable code topic-typeguard TypeGuard / PEP 647

Comments

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Sep 22, 2023

def guard(a: object) -> TypeGuard[Never]: ...

a: object
assert guard(a)
print("hi")  # expected error unreachable
@KotlinIsland KotlinIsland changed the title (🎁) Report unreachable when TypeGuard[Never] (🎁) Report unreachable when TypeGuard[Never] Sep 22, 2023
@AlexWaygood AlexWaygood added topic-reachability Detecting unreachable code topic-typeguard TypeGuard / PEP 647 labels Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature topic-reachability Detecting unreachable code topic-typeguard TypeGuard / PEP 647
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants