Skip to content

Why does the "is" keyword not narrow the type #8264

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

You must be logged in to vote

Ah, you're correct. Since the RHS is a specific class A, as opposed to a variable of type type[A], we can safely narrow the type here. I'll include a fix in the next release.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@lovetox
Comment options

@erictraut
Comment options

Answer selected by lovetox
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