Repository navigation
Commit 70b74e1
authored
[mypyc] Use
Fixes #21566
`create_ne_from_eq()` checks whether the class has an `__eq__` method
using `cls.has_method("__eq__")`, but `gen_glue_ne_method()` then
requires `cls.get_method("__eq__")` to return a concrete `FuncIR`.
In this package-cycle case, the inherited method declaration exists, but
the concrete `FuncIR` body is not available yet. This makes
`cls.has_method("__eq__")` true while `cls.get_method("__eq__")` returns
None.method_sig to get the method signature (#21567)1 parent 8f2d0f1 commit 70b74e1
2 files changed
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
865 | | - | |
866 | | - | |
867 | | - | |
| 865 | + | |
868 | 866 | | |
869 | 867 | | |
870 | 868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1710 | 1710 | | |
1711 | 1711 | | |
1712 | 1712 | | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
1713 | 1748 | | |
1714 | 1749 | | |
1715 | 1750 | | |
| |||
0 commit comments