We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06a28bc commit 19da620Copy full SHA for 19da620
mypyc/analysis/ircheck.py
@@ -196,7 +196,10 @@ def can_coerce_to(src: RType, dest: RType) -> bool:
196
if isinstance(src, RPrimitive):
197
# If either src or dest is a disjoint type, then they must both be.
198
if src.name in disjoint_types and dest.name in disjoint_types:
199
- return src.name == dest.name
+ return src.name == dest.name or (
200
+ src.name in ("builtins.dict", "builtins.dict[exact]")
201
+ and dest.name in ("builtins.dict", "builtins.dict[exact]")
202
+ )
203
return src.size == dest.size
204
if isinstance(src, RInstance):
205
return is_object_rprimitive(dest)
0 commit comments