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 3 replies

Comment options

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

@erictraut
Comment options

Answer selected by lovetox
@winstxnhdw
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants