-
This does not narrow the type to A, pyright still thinks |
Beta Was this translation helpful? Give feedback.
Answered by
erictraut
Jun 29, 2024
Replies: 1 comment 2 replies
-
The type of It's not safe to narrow in this case because |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah, you're correct. Since the RHS is a specific class
A
, as opposed to a variable of typetype[A]
, we can safely narrow the type here. I'll include a fix in the next release.