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