Open
Description
mypy: 0.650
Python: 3.7.1
I'm not sure if this is a bug or a new feature, however the following code is unexpected (in my mind, especially coming from TypeScript):
d = {"1": 2, 3: 4}
reveal_type(d) # builtins.dict[builtins.object*, builtins.int*]
I would have expected mypy to infer the type of d
as builtins.dict[Union[builtins.str*, builtins.int*], builtins.int*]
.