Skip to content

Commit 3942c62

Browse files
committed
Update subtype.py
1 parent f43c072 commit 3942c62

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mypyc/subtype.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
"""Subtype check for RTypes."""
23

34
from __future__ import annotations
@@ -14,6 +15,8 @@
1415
RVoid,
1516
is_bit_rprimitive,
1617
is_bool_rprimitive,
18+
is_dict_rprimitive,
19+
is_exact_dict_rprimitive,
1720
is_fixed_width_rtype,
1821
is_int_rprimitive,
1922
is_object_rprimitive,
@@ -67,6 +70,9 @@ def visit_rprimitive(self, left: RPrimitive) -> bool:
6770
elif is_fixed_width_rtype(left):
6871
if is_int_rprimitive(right):
6972
return True
73+
elif is_exact_dict_rprimitive(left):
74+
if is_dict_rprimitive(right):
75+
return True
7076
return left is right
7177

7278
def visit_rtuple(self, left: RTuple) -> bool:

0 commit comments

Comments
 (0)