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 f43c072 commit 3942c62Copy full SHA for 3942c62
mypyc/subtype.py
@@ -1,3 +1,4 @@
1
+
2
"""Subtype check for RTypes."""
3
4
from __future__ import annotations
@@ -14,6 +15,8 @@
14
15
RVoid,
16
is_bit_rprimitive,
17
is_bool_rprimitive,
18
+ is_dict_rprimitive,
19
+ is_exact_dict_rprimitive,
20
is_fixed_width_rtype,
21
is_int_rprimitive,
22
is_object_rprimitive,
@@ -67,6 +70,9 @@ def visit_rprimitive(self, left: RPrimitive) -> bool:
67
70
elif is_fixed_width_rtype(left):
68
71
if is_int_rprimitive(right):
69
72
return True
73
+ elif is_exact_dict_rprimitive(left):
74
+ if is_dict_rprimitive(right):
75
+ return True
76
return left is right
77
78
def visit_rtuple(self, left: RTuple) -> bool:
0 commit comments