Closed
Description
The code
x : Union[Dict[int, int], Dict[str, str]] = dict(a='b')
for a, b in x.items():
print(a, b)
yields
error: 'Union[Tuple[builtins.int*, builtins.int*], Tuple[builtins.str*, builtins.str*]]' object is not iterable
Using just Dict[str, str] instead of the Union passes.
The code (naturally) runs in python, and both elements in the union are iterable...