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 0a376c6 commit 0604390Copy full SHA for 0604390
mypyc/analysis/ircheck.py
@@ -199,7 +199,10 @@ def can_coerce_to(src: RType, dest: RType) -> bool:
199
if isinstance(src, RPrimitive):
200
# If either src or dest is a disjoint type, then they must both be.
201
if src.name in disjoint_types and dest.name in disjoint_types:
202
- return src.name == dest.name
+ return src.name == dest.name or (
203
+ src.name in ("builtins.dict", "builtins.dict[exact]")
204
+ and dest.name in ("builtins.dict", "builtins.dict[exact]")
205
+ )
206
return src.size == dest.size
207
if isinstance(src, RInstance):
208
return is_object_rprimitive(dest)
0 commit comments