Repository navigation
Commit cd75c4e
Fixes #21568
In `gen_glue_ne_method`, mypyc currently chooses the generated RHS
argument type like this when strict dunder typing is enabled:
```python
rhs_type = eq_sig.args[0].type if strict_typing else object_rprimitive
```
However, the `__eq__` signature includes `self`, so `eq_sig.args[0]` is
the type of `self`, not the type of `other`.
---------
Co-authored-by: Piotr Sawicki <[email protected]>
1 parent 70b74e1 commit cd75c4e
2 files changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
865 | 865 | | |
866 | 866 | | |
867 | 867 | | |
868 | | - | |
| 868 | + | |
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
0 commit comments