Skip to content

Commit 555d83a

Browse files
committed
Update ircheck.py
1 parent 11768a9 commit 555d83a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mypyc/analysis/ircheck.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ def can_coerce_to(src: RType, dest: RType) -> bool:
197197
if isinstance(src, RPrimitive):
198198
# If either src or dest is a disjoint type, then they must both be.
199199
if src.name in disjoint_types and dest.name in disjoint_types:
200-
return src.name == dest.name
200+
return src.name == dest.name or (
201+
src.name in ("builtins.dict", "builtins.dict[exact]")
202+
and dest.name in ("builtins.dict", "builtins.dict[exact]")
203+
)
201204
return src.size == dest.size
202205
if isinstance(src, RInstance):
203206
return is_object_rprimitive(dest)

0 commit comments

Comments
 (0)