Skip to content

Assigning ... to a type statement shadows SyntaxError, is this intended? #9120

Closed Answered by erictraut
Daraan asked this question in Q&A
Discussion options

You must be logged in to vote

Pyright should be emitting an error here because ... is an invalid type expression. It's internally detecting this error condition (without reporting it) and then skipping additional checks for the remainder of the type expression, which is why you don't see the other error that you expected.

This will be addressed in the next release.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Daraan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants