You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You get an error: Argument 1 to "remove" of "set" has incompatible type "Union[int, str]"; expected "int". However, obviously this can never happen; inside the conditional, the type of y must be an int because we know that it's contained within a set of Ints. This issue comes up with all typed container types.
It gets a bit more complex if the container type itself is a container of a Union type, but I think the correct rule here is that "y is contained in x implies the type of y is the intersection of the possible types of y and the types x can contain".
The text was updated successfully, but these errors were encountered:
This is probably an easy-ish enhancement. If you check the following code:
You get an
error: Argument 1 to "remove" of "set" has incompatible type "Union[int, str]"; expected "int"
. However, obviously this can never happen; inside the conditional, the type of y must be an int because we know that it's contained within a set of Ints. This issue comes up with all typed container types.It gets a bit more complex if the container type itself is a container of a Union type, but I think the correct rule here is that "y is contained in x implies the type of y is the intersection of the possible types of y and the types x can contain".
The text was updated successfully, but these errors were encountered: