Skip to content

Commit 19da620

Browse files
Update ircheck.py
1 parent 06a28bc commit 19da620

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
@@ -196,7 +196,10 @@ def can_coerce_to(src: RType, dest: RType) -> bool:
196196
if isinstance(src, RPrimitive):
197197
# If either src or dest is a disjoint type, then they must both be.
198198
if src.name in disjoint_types and dest.name in disjoint_types:
199-
return src.name == dest.name
199+
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+
)
200203
return src.size == dest.size
201204
if isinstance(src, RInstance):
202205
return is_object_rprimitive(dest)

0 commit comments

Comments
 (0)